Action requested: Declare your Ad ID permission

Viewed 30388

Today i have got this email:

Last July, we announced Advertising policy changes to help bolster security and privacy. We added new restrictions on identifiers used by apps that target children. When users choose to delete their advertising ID in order to opt out of personalization advertising, developers will receive a string of zeros instead of the identifier if they attempt to access the identifier. This behavior will extend to phones, tablets, and Android TV starting April 1, 2022. We also announced that you need to declare an AD_ID permission when you update your app targeting API level to 31 (Android 12). Today, we are sharing that we will give developers more time to ease the transition. We will require this permission declaration when your apps are able to target Android 13 instead of starting with Android 12.

Action Items If you use an advertising ID, you must declare the AD_ID Permission when your app targets Android 13 or above. Apps that don’t declare the permission will get a string of zeros. Note: You’ll be able to target Android 13 later this year. If your app uses an SDK that has declared the Ad ID permission, it will acquire the permission declaration through manifest merge. If your app’s target audience includes children, you must not transmit Android Advertising ID (AAID) from children or users of unknown age.

My app is not using the Advertising ID. Should i declare the AD_ID Permission in Manifest or not?

8 Answers

If the app doesn't contain any Ads:

You can simply remove/ignore it by adding tools:node="remove" in the AndroidManifest.xml file.

<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>

Even if another third-party library asks for this specific permission, the build will be forced not to merge it in your final Manifest file. You can get more info from this SO answer.

Case 1: Your App has Ads

Add the following to AndroidManifest.xml before </manifest>:

<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>

Case 2: Your App Doesn't have Ads

At the top of your AndroidManifest.xml make sure you have xmlns:tools on the <manifest ...>. (kudos to this answer) e.g.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.mycompany.myapp">

Then, add the following at the bottom of the page, before </manifest> tag:

    <uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>

Source:

Don't worry. All developer who uses Admob for advertisement received this warning. Just make sure you are using Latest Google Mobile Ads SDK(Admob) OR AdMob SDK version higher or equal to 20.4.0 in your build.gradle file. In that case SDK automatically manage it.

Otherwise for older sdk below 20.4.0, we need to manually mention below line in our AndroidManifest.xml

<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>

If your app doesn't contain ads, make sure you complete the survey on App content page (Policy > App content) in Play Console.

Just select the option: No, my app does not contain ads.

If you don't do that, you won't be able to upload new releases of your app to Google Play.

Google Play Console screenshot

I also received today's mail from the PlayStore team to all developers. Asking to declare AD_ID permission. Since we developed and released our application using Flutter with android targeting to API level 31. I'm using the advertising_identifier: ^0.1.1 plugin to get the advertising client ID. I haven't declared AD_ID permission in my manifest file.

Additionally, apps updating their target API level to 31 (Android 12) and using advertise identifier / advertise id client info fetch will need to declare a Google Play services normal permission in the manifest file as follows:

<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>

Refered,

https://support.google.com/googleplay/android-developer/answer/6048248?hl=en

First of all,
com.google.android.gms.permission.AD_ID can be added by other third party SDK like

  • Play Services-ads
  • firebase-analytics etc

So, if you haven't added permission.AD_ID manually, make sure it is not added by any other SDK by checking merged manifest file.

merged-manifest path:
project > app > build > intermediate > merged_manifest > release > AndroidManifest.xml

Now go to your play console > app content > Adverstising ID and

  • Select NO if your merged manifest doesn't contain AD_ID, else
  • Select YES and complete next option.
Related