Highlighted

Adobe AIR: Firebase Performance integration

Community Beginner ,
Aug 02, 2019

Copy link to clipboard

Copied

Environment:

AIR SDK 29

Android API 15+

Description:

We are already using Firebase for Cloud Messaging and Analytics in our app. Now I'm trying to integrate Firebase Performance.

I have added firebase-perf in ANE. Tried with different versions: 15.2.0, 16.0.0, 16.2.5. Added below permissions and provider in app-xml.

<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

<uses-permission android:name="com.google.android.providers.gsf.permission.WRITE_GSERVICES" />

and

<provider

         android:name="com.google.firebase.perf.provider.FirebasePerfProvider"

         android:exported="false"

         android:authorities="{APP_ID}.firebaseperfprovider"

         android:initOrder="101" />

But app crashes on app start with this error:

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.firebase.perf.FirebasePerformance.isPerformanceCollectionEnabled()' on a null object reference

        at com.google.android.gms.internal.firebase-perf.zzg.zzq(Unknown Source)

        at com.google.android.gms.internal.firebase-perf.zzg.zzp(Unknown Source)

        at com.google.android.gms.internal.firebase-perf.zzg.zzb(Unknown Source)

        at com.google.android.gms.internal.firebase-perf.zzh.run(Unknown Source)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)

        at java.lang.Thread.run(Thread.java:762)

Is there a way to manually initialise Firebase Performance or fix this issue?

Note: Not updated to latest version of Firebase Performance because AndroidX migration not yet done with all the libraries we have in our app.

Performance has always caused me problems, with some versions not working and others working.

I am currently using 16.2.1

Have you added the ComponentDiscoveryService tags ?

eg

<application android:enabled="true">

  <meta-data

  android:name="com.google.android.gms.version"

  android:value="@integer/google_play_services_version" />

  <service android:name="com.google.firebase.components.ComponentDiscoveryService" >

  <meta-data

  android:name="com.google.firebase.components:com.google.firebase.perf.component.FirebasePerfRegistrar"

  android:value="com.google.firebase.components.ComponentRegistrar" />

  <meta-data

  android:name="com.google.firebase.components:com.google.firebase.firestore.FirestoreRegistrar"

  android:value="com.google.firebase.components.ComponentRegistrar" />

  <meta-data

  android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar"

  android:value="com.google.firebase.components.ComponentRegistrar" />

  <meta-data

  android:name="com.google.firebase.components:com.google.firebase.iid.Registrar"

  android:value="com.google.firebase.components.ComponentRegistrar" />

  <meta-data

  android:name="com.google.firebase.components:com.google.firebase.auth.FirebaseAuthRegistrar"

  android:value="com.google.firebase.components.ComponentRegistrar" />

  </service>

TOPICS
Development

Views

462

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Adobe AIR: Firebase Performance integration

Community Beginner ,
Aug 02, 2019

Copy link to clipboard

Copied

Environment:

AIR SDK 29

Android API 15+

Description:

We are already using Firebase for Cloud Messaging and Analytics in our app. Now I'm trying to integrate Firebase Performance.

I have added firebase-perf in ANE. Tried with different versions: 15.2.0, 16.0.0, 16.2.5. Added below permissions and provider in app-xml.

<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

<uses-permission android:name="com.google.android.providers.gsf.permission.WRITE_GSERVICES" />

and

<provider

         android:name="com.google.firebase.perf.provider.FirebasePerfProvider"

         android:exported="false"

         android:authorities="{APP_ID}.firebaseperfprovider"

         android:initOrder="101" />

But app crashes on app start with this error:

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.firebase.perf.FirebasePerformance.isPerformanceCollectionEnabled()' on a null object reference

        at com.google.android.gms.internal.firebase-perf.zzg.zzq(Unknown Source)

        at com.google.android.gms.internal.firebase-perf.zzg.zzp(Unknown Source)

        at com.google.android.gms.internal.firebase-perf.zzg.zzb(Unknown Source)

        at com.google.android.gms.internal.firebase-perf.zzh.run(Unknown Source)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)

        at java.lang.Thread.run(Thread.java:762)

Is there a way to manually initialise Firebase Performance or fix this issue?

Note: Not updated to latest version of Firebase Performance because AndroidX migration not yet done with all the libraries we have in our app.

Performance has always caused me problems, with some versions not working and others working.

I am currently using 16.2.1

Have you added the ComponentDiscoveryService tags ?

eg

<application android:enabled="true">

  <meta-data

  android:name="com.google.android.gms.version"

  android:value="@integer/google_play_services_version" />

  <service android:name="com.google.firebase.components.ComponentDiscoveryService" >

  <meta-data

  android:name="com.google.firebase.components:com.google.firebase.perf.component.FirebasePerfRegistrar"

  android:value="com.google.firebase.components.ComponentRegistrar" />

  <meta-data

  android:name="com.google.firebase.components:com.google.firebase.firestore.FirestoreRegistrar"

  android:value="com.google.firebase.components.ComponentRegistrar" />

  <meta-data

  android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar"

  android:value="com.google.firebase.components.ComponentRegistrar" />

  <meta-data

  android:name="com.google.firebase.components:com.google.firebase.iid.Registrar"

  android:value="com.google.firebase.components.ComponentRegistrar" />

  <meta-data

  android:name="com.google.firebase.components:com.google.firebase.auth.FirebaseAuthRegistrar"

  android:value="com.google.firebase.components.ComponentRegistrar" />

  </service>

TOPICS
Development

Views

463

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 02, 2019 0
Engaged ,
Aug 02, 2019

Copy link to clipboard

Copied

Performance has always caused me problems, with some versions not working and others working.

I am currently using 16.2.1

Have you added the ComponentDiscoveryService tags ?

eg

<application android:enabled="true">

  <meta-data

  android:name="com.google.android.gms.version"

  android:value="@integer/google_play_services_version" />

  <service android:name="com.google.firebase.components.ComponentDiscoveryService" >

  <meta-data

  android:name="com.google.firebase.components:com.google.firebase.perf.component.FirebasePerfRegistrar"

  android:value="com.google.firebase.components.ComponentRegistrar" />

  <meta-data

  android:name="com.google.firebase.components:com.google.firebase.firestore.FirestoreRegistrar"

  android:value="com.google.firebase.components.ComponentRegistrar" />

  <meta-data

  android:name="com.google.firebase.components:com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar"

  android:value="com.google.firebase.components.ComponentRegistrar" />

  <meta-data

  android:name="com.google.firebase.components:com.google.firebase.iid.Registrar"

  android:value="com.google.firebase.components.ComponentRegistrar" />

  <meta-data

  android:name="com.google.firebase.components:com.google.firebase.auth.FirebaseAuthRegistrar"

  android:value="com.google.firebase.components.ComponentRegistrar" />

  </service>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 02, 2019 0