Reputation: 2128
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)
;
Upvotes: 4
Views: 1022
Reputation: 3494
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.
Upvotes: 2