Firebase Analytics for android has a metadata for the manifest to disable data collection before the user's consent
<meta-data android:name="firebase_analytics_collection_enabled" android:value="false" />
To re-enable collection, such as after an end-user provides consent there is the method
setAnalyticsCollectionEnabled(true);
To limit only the collection of the advertising id there is the metadata to add to the manifest
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />
Then, to rehabilitate the collection of the advertising id, after the user's consent is there a dedicated method? Or is it okay to continue to use setAnalyticsCollectionEnabled(true)
;
setAnalyticsCollectionEnabled(true)
doesn't influence setting google_analytics_adid_collection_enabled
. Once you disable advertising id collection in the manifest file, there is no way to enable it programatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With