4

I'm disabling analytics on my project deleting the .json file and deleting this from app gradle file:

apply plugin: 'com.google.gms.google-services'

And also deleting all the push or analytics init calls.

Also, I'm adding this on manifest:

<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true"/>

Even I deleted the two notifications services from the manifst (MESSAGING_EVENT and INSTANCE_ID_EVENT)

But after doing that, I'm getting this error warning every time I open a section:

02-26 13:05:15.687 10605-10605/? I/FirebaseInitProvider: FirebaseApp initialization unsuccessful
02-26 13:05:20.574 10605-10743/? I/FA: To enable faster debug mode event logging run:
                                         adb shell setprop debug.firebase.analytics.app com.mypackage.myapp
02-26 13:05:20.578 10605-10743/? E/FA: Missing google_app_id. Firebase Analytics disabled.

What more should I do to completely disable Firebase without removing the Gradle compile files?

halfer
  • 19,824
  • 17
  • 99
  • 186
NullPointerException
  • 36,107
  • 79
  • 222
  • 382

1 Answers1

2

you can disable the analytics using

<meta-data android:name="firebase_analytics_collection_enabled" android:value="false" />

or

FirebaseAnalytics.getInstance(activity).setAnalyticsCollectionEnabled(false);
Harsh Agrawal
  • 597
  • 3
  • 12