30

I am using Firebase and google analytics though.

The advertising ID declaration form is now available for you to complete.

We'll use this declaration to provide safeguards in Play Console. You will not be able to create releases targeting Android 13 until you complete the declaration.

Apps using advertising ID that target API level 33 (Android 13) or later must declare the normal permission com.google.android.gms.permission.AD_ID in their AndroidManifest.xml. This will prevent your advertising identifier from zeroing out. If you do not declare the permission in your manifest file, or if you use an SDK that omits the permission from their library manifest, this may impact your advertising and analytics use cases.

Harsh Vardhan
  • 559
  • 1
  • 3
  • 12

4 Answers4

31

You need to check if your final merged manifest, AndroidManifest.xml, includes the permission com.google.android.gms.permission.AD_IDor not.

If it does, you need to answer Yes and answer the questions that are prompted; if it does not you should answer No.

You may not be including this permission explicitly in your AndroidManifest.xml, but it could still be present in your final merged manifest after the build is done, contributed by one of the dependencies you have on your project.

To verify this, you can use the Merged Manifest Viewer on Android Studio and look for com.google.android.gms.permission.AD_ID, or check this files on the build folder:

└── APP MODULE
├── intermediates
│   ├── merged_manifest
│      └── flavourBuild
│          └── out
│              └── AndroidManifest.xml
└── outputs
    └── logs
        └── manifest-merger-prod-release-report.txt

Search for com.google.android.gms.permission.AD_ID inside manifest-merger-FLAVOUR-BUILD-report.txt and you will get if it was included, and by what library.

Example

Example - Added by the inclusion of Firebase Config Library a dev of Firebase

Search for com.google.android.gms.permission.AD_ID inside AndroidManifest.xml and you will get to find if it was included or not.

You can remove the permission by including a removal rule on you AndroidManifest, like explained here, but that can cause problems on the functionality of the dependencies that need it.

cristiano2lopes
  • 3,168
  • 2
  • 18
  • 22
  • Yes, it found in `AndroidManifest.xml` and `manifest-merger-debug-report` (or release). Thank you for the excellent explanation. – M DEV Aug 19 '22 at 13:12
  • You can also open the merged manifest directly via file explorer _after_ building your project: `//build/intermediates/merged_manifests/`. – Lifes Sep 03 '22 at 14:02
  • 1
    Now that I've found those files, and indeed that permission is there, how do I find out which one of my plugins/external packages actually needs this permission? So that I may make an informed choice whether to keep it or not. (And also to answer the Play Console qns in a meaningful way, as to why this permission is needed...) – Karolina Hagegård Jul 18 '23 at 14:17
  • 1
    @KarolinaHagegård On the second picture check the ADDED markers. That id is the library that is including it. – cristiano2lopes Jul 19 '23 at 15:05
  • @cristiano2lopes, so it's the library BEFORE the permission that's added the permission, or the library mentioned AFTER the permission...? – Karolina Hagegård Jul 22 '23 at 16:47
  • @KarolinaHagegård After. You will see uses-permission... and after that ADDED from and the name of the module that added it. – cristiano2lopes Jul 24 '23 at 12:13
  • @cristiano2lopes Awesome, thanks! – Karolina Hagegård Jul 27 '23 at 07:16
13

It seems that Google play has pushed this policy to all developers, and it will be a must for every application in the future.

If you are not using ads, you can choose NO.

Update

If you haven't encountered the popup selection and got this warning while uploading an app to the store, follow these steps in case you are not using AdID:

Go to App Content -> Advertising Id -> Does your app use advertising ID? -> NO -> Save

genericUser
  • 4,417
  • 1
  • 28
  • 73
didikee
  • 449
  • 5
  • 9
  • 9
    I have selected NO. But it still says "Your app targets Android 13 (API 33) or above. You must declare the use of advertising ID in Play Console." – yong ho Jul 30 '22 at 03:17
  • @yongho - I had this same issue. I went back and clicked Yes, and then clicked No, and then clicked Save. That made it go away for me. – C. Skjerdal Jul 31 '22 at 18:01
  • I saw this warning while uploading a new release to the store, But I didn't have any selection option. Where do I select and save NO? – genericUser Aug 03 '22 at 07:49
  • 3
    That didn't work in above case. – Hitesh sapra Aug 10 '22 at 04:27
  • After selecting no if the console says you do have that permission check the merged manifest in my case google play services library was adding this permission – Aniruddha K.M Mar 13 '23 at 18:53
  • @Mightian you can add `` in manifest file to prevent third-party library injection – didikee Mar 20 '23 at 02:22
3

I got the same warning while reviewing my last update. I just went to complete the advertising ID declaration (selecting NO - since I don't use any ads in my app) and the warning just disappeared.

NOTE: I am also using Firebase and its analytics in the app.

jux_97
  • 393
  • 1
  • 5
  • 14
1

remove from dependence if you not need

flutter_facebook_auth: ^4.4.1+1

Abdallah Mahmoud
  • 491
  • 1
  • 5
  • 8