Will preventing AD_ID permission to be merged affect Firebase functionality?
Asked Answered
P

1

8

So we were about to submit our app for review but we were stopped by Google's new requirement for apps targeting Android 13 and above, which basically tells developers to disclose the purpose of AD_ID permission in their app. The thing is, our app doesn't declare the AD_ID permission explicitly, but it turns out some play-services lib or Firebase uses it and thus, it has been merged to our app's manifest.

So I found some solutions so that a permission declared by a library will not be merged to an app's manifest, but my fear is that our app's functionality that depends on Firebase might stop working. Has anyone faced this situation?

Pulsimeter answered 28/7, 2022 at 8:2 Comment(1)
How did you exclude that permission from the manifest merging? Trying to resolv exactly the same issue the second day in lineHallette
L
11

If you've disabled collection already, removing the AD_ID permission is unlikely to cause problems. See: https://github.com/firebase/firebase-android-sdk/issues/2582

Disable collection:

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

Remove permission:

<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove" />
Lassalle answered 28/7, 2022 at 20:56 Comment(4)
Just in case you get an conflict error use <meta-data android:name="google_analytics_adid_collection_enabled" tools:replace="android:value" android:value="false" />Heehaw
Also, this post if you get an xml error on tools:node. #55334931Viborg
FYI for others: these changes go in your AndroidManifest.xml file.Unbeliever
I had to put the meta-data tag inside my <application> tag (alongside my <activity> tag) and add the xmlns:tools="http://schemas.android.com/tools" attribute to my <manifest> tag. (<uses-permission> went alongside my other <uses-permission> tags and my <application> tag within the <manifest> tag.)Unbeliever

© 2022 - 2024 — McMap. All rights reserved.