Firebase Analytics declared com.google.android.gms.permission.AD_ID permission despite that the collection is disabled
Asked Answered
B

1

8

I implemented firebase analytics into an android app. I set <meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" /> to disable the Advertising ID collection. (IDFA collection on iOS is also disabled, thus it makes sense to stay consistent, does it not?)

However, the <uses-permission android:name="com.google.android.gms.permission.AD_ID"/>still is added by firebase analytics. Thus, in order to submit my app i had to answer the question: Does your app use an advertising ID? with yes.

This seems odd to me. How do you guys handle this?

Also, what is the SSAID collection, and does it make sense to disable that too?

Beanery answered 26/4, 2023 at 11:53 Comment(0)
C
9

I encountered the same problem in one of my projects.

If you do not want this permission to be included in the merged manifest and do not want ad ID collection to occur, you must manually exclude it from being added to the final version of the manifest by adding this code to the manifest:

<meta-data android:name="google_analytics_adid_collection_enabled"
android:value="false" />
<uses-permission
android:name="com.google.android.gms.permission.AD_ID"
tools:node="remove" />

By disabling ad id collection, as far as I know you may not see some additional information for events in the Console. It may be some demographic data or something like that.

Casias answered 26/4, 2023 at 12:5 Comment(4)
Thanks, do you know how this affects firebase analytics?Beanery
Did you solve the problem? I have Firebase Crashlytics and Firebase Analytics. I think Firebase Crashlytics uses AD_ID. I added it in the manifest file but google says it is not added???Quinque
Nice find!! this definitely needs to be added to their main documentation here: firebase.google.com/docs/analytics/…. There is nothing in their documentation mentioning removing the uses-permission the way you provided above.. which is exactly what I needed. Thank you!Public
Note that your tools reference only works if you have the tools namespace defined in the manifest tag: xmlns:tools="http://schemas.android.com/tools".Banzai

© 2022 - 2025 — McMap. All rights reserved.