Instructions can be found at: https://firebase.google.com/support/guides/disable-analytics
Disable the Google Analytics Collection on Android
Temporarily disable a collection
If you want to temporarily disable the Google Analytics collection, for example, to obtain end-user consent before collecting data, you can set the firebase_analytics_collection_enabled value to false in the AndroidManifest.xml application in the application tag. For instance:
<meta-data android:name="firebase_analytics_collection_enabled" android:value="false" />
To enable collection again, for example, after obtaining end-user consent, call the setAnalyticsCollectionEnabled () method of the FirebaseAnalytics class. For instance:
setAnalyticsCollectionEnabled(true);
If you need to suspend the collection again for any reason, you can call
setAnalyticsCollectionEnabled(false);
and collection is paused until you re-enable it.
Permanently deactivate collection
If you need to deactivate the Google Analytics collection permanently in the version of your application, set firebase_analytics_collection_deactivated to true in the AndroidManifest.xml application in the application tag. For instance:
<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
source share