AD_ID Permission Declaration for Android Apps
Quick Summary
- No ads in your app? Declare
tools:node="remove"
in your manifest and select "No" in Play Console - Using ads? Add the standard permission and declare ad usage in Play Console
- Using analytics only? Select "Yes" for Advertising ID but "Analytics" as the reason in Play Console
- Using AdMob 20.4.0+? The SDK automatically handles the permission declaration
Understanding the AD_ID Permission Requirement
Starting with Android 13, Google requires explicit declaration of the AD_ID
permission for apps that use advertising identifiers. This change enhances user privacy by:
- Providing a string of zeros instead of actual identifiers when users opt out of personalized advertising
- Giving users more control over their advertising data
- Extending these privacy protections to phones, tablets, and Android TV
How to Check if Your App Needs AD_ID Permission
Before making any changes, examine your merged manifest to see if the AD_ID permission is being included by any dependencies:
project > app > build > intermediate > merged_manifest > release > AndroidManifest.xml
Look for this line in the merged manifest:
<uses-permission android:name="com.google.android.gms.permission.AD_ID" />
Solution 1: App Without Ads or Advertising ID
If your app doesn't use any advertising functionality:
Step 1: Update AndroidManifest.xml
Add the following line to prevent the permission from being merged into your final manifest:
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove" />
Ensure you have the tools namespace declared at the top of your manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.yourcompany.yourapp">
Step 2: Update Play Console Declaration
In Google Play Console, navigate to: Policy > App content > Advertising ID
Select: "No, my app does not contain ads"
Important
Failure to complete this declaration will prevent you from uploading new app releases to Google Play.
Solution 2: App With Ads
If your app displays advertisements:
Step 1: Add Permission to AndroidManifest.xml
<uses-permission android:name="com.google.android.gms.permission.AD_ID" />
Step 2: Update Play Console Declaration
In Google Play Console, navigate to: Policy > App content > Advertising ID
Select: "Yes" and follow the additional prompts to declare your ad usage.
Solution 3: App Uses Advertising ID for Analytics Only
Some apps use the advertising ID for analytics purposes without displaying ads (e.g., Firebase Analytics). In this case:
Step 1: Keep the Permission
Do not remove the AD_ID permission if analytics functionality depends on it.
Step 2: Update Play Console Declaration
In Google Play Console, navigate to: Policy > App content > Advertising ID
Select: "Yes" but choose "Analytics" as the reason instead of advertising.
Note
This approach ensures analytics functionality continues working without marking your app as containing advertisements in the Play Store.
Special Case: AdMob Users
If you're using Google AdMob:
- Version 20.4.0 or higher: The SDK automatically declares the AD_ID permission—no manual action needed
- Older versions: Manually add the permission to your manifest as shown in Solution 2
Common Libraries That May Require AD_ID
These dependencies might automatically include the AD_ID permission:
play-services-ads
(Google Ads)firebase-analytics
(Firebase Analytics)play-services-measurement-api
(Analytics components)
Warning
Forcefully removing the AD_ID permission (using tools:node="remove"
) when your app actually uses analytics services that depend on it may break functionality. Always check your merged manifest first.
Timeline and Target SDK Considerations
- Originally planned for Android 12 (API 31), now required for Android 13 (API 33) and above
- If targeting API 33+, you must address this permission requirement
- Apps not declaring the proper permission will receive a string of zeros instead of actual advertising IDs
Summary Table
App Type | Manifest Change | Play Console Declaration |
---|---|---|
No ads | tools:node="remove" | Select "No" |
Contains ads | Add permission | Select "Yes" (Ads) |
Analytics only | Keep permission | Select "Yes" (Analytics) |
AdMob 20.4.0+ | Automatic | Automatic based on SDK |
By following these guidelines, you ensure compliance with Google's updated advertising policies while maintaining your app's functionality and privacy standards.