Android 13 advertising id error

Additionally, when apps update their target to Android 13 or above 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"/>

how to add this in manifest?

Find a random extension.
Open it with any zip software.
Go to files dir, there you'll find component_build_infos.json
Open this file and add required permission to permissions array.
Validate json format online and if everything found good then save file and import aix in project.

{
"contentProviders": ,
"metadata": ,
"broadcastReceivers": ,
"broadcastReceiver": ,
"libraries": ,
"services": ,
"type": "com.sunny.CustomWebView.BrowserPromptHelper",
"androidMinSdk": ["21"],
"activityMetadata": ,
"assets": ,
"native": ,
"permissions": [
"<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>"
],
"activities": [
"<activity android:name="appinventor.ai_vknow360.CustomWebView.Screen1" android:launchMode="singleTop">\n \n <action android:name="android.intent.action.VIEW"/>\n <category android:name="android.intent.category.DEFAULT"/>\n <category android:name="android.intent.category.BROWSABLE"/>\n <data android:scheme="http"/>\n <data android:scheme="https"/>\n \n \n <action android:name="android.intent.action.VIEW"/>\n <category android:name="android.intent.category.DEFAULT"/>\n <category android:name="android.intent.category.BROWSABLE"/>\n <data android:scheme="http"/>\n <data android:scheme="https"/>\n <data android:mimeType="text/html"/>\n <data android:mimeType="text/plain"/>\n <data android:mimeType="application/xhtml+xml"/>\n \n "
]
}
is this correct??

or this correct [
{
"contentProviders": [],
"metadata": [],
"broadcastReceivers": [],
"broadcastReceiver": [],
"libraries": [],
"services": [],
"type": "com.sunny.CustomWebView.BrowserPromptHelper",
"androidMinSdk": ["21"],
"activityMetadata": [],
"assets": [],
"native": [],
"permissions": ["<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>"],
"activities": [
"<activity android:name="appinventor.ai_vknow360.CustomWebView.Screen1" android:launchMode="singleTop">\n \n <action android:name="android.intent.action.VIEW"/>\n <category android:name="android.intent.category.DEFAULT"/>\n <category android:name="android.intent.category.BROWSABLE"/>\n <data android:scheme="http"/>\n <data android:scheme="https"/>\n \n \n <action android:name="android.intent.action.VIEW"/>\n <category android:name="android.intent.category.DEFAULT"/>\n <category android:name="android.intent.category.BROWSABLE"/>\n <data android:scheme="http"/>\n <data android:scheme="https"/>\n <data android:mimeType="text/html"/>\n <data android:mimeType="text/plain"/>\n <data android:mimeType="application/xhtml+xml"/>\n \n "
]
},
{
"contentProviders": [],
"metadata": [],
"broadcastReceivers": [],
"broadcastReceiver": [],
"libraries": [],
"services": [],
"type": "com.sunny.CustomWebView.CustomWebView",
"androidMinSdk": ["21"],
"activityMetadata": [],
"assets": [],
"native": [],
"permissions": [
"android.permission.ACCESS_FINE_LOCATION",
"android.webkit.resource.AUDIO_CAPTURE",
"android.launcher.permission.INSTALL_SHORTCUT",
"android.permission.VIBRATE",
"android.permission.MODIFY_AUDIO_SETTINGS",
"android.permission.CAMERA",
"android.permission.RECORD_AUDIO",
"android.permission.WRITE_EXTERNAL_STORAGE",
"android.webkit.resource.VIDEO_CAPTURE",
"android.permission.ACCESS_DOWNLOAD_MANAGER",
"<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>"
],
"activities": []
},
{
"contentProviders": [],
"metadata": [],
"broadcastReceivers": [],
"broadcastReceiver": [],
"libraries": [],
"services": [],
"type": "com.sunny.CustomWebView.DownloadHelper",
"androidMinSdk": ["21"],
"activityMetadata": [],
"assets": [],
"native": [],
"permissions": ["<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>"],
"activities": []
}
]

or both are correct??

Just put permission name without uses permission tag.

[
{
"contentProviders": [],
"metadata": [],
"broadcastReceivers": [],
"broadcastReceiver": [],
"libraries": [],
"services": [],
"type": "com.sunny.CustomWebView.BrowserPromptHelper",
"androidMinSdk": ["21"],
"activityMetadata": [],
"assets": [],
"native": [],
"permissions": ["com.google.android.gms.permission.AD_ID"],
"activities": [
"<activity android:name="appinventor.ai_vknow360.CustomWebView.Screen1" android:launchMode="singleTop">\n \n <action android:name="android.intent.action.VIEW"/>\n <category android:name="android.intent.category.DEFAULT"/>\n <category android:name="android.intent.category.BROWSABLE"/>\n <data android:scheme="http"/>\n <data android:scheme="https"/>\n \n \n <action android:name="android.intent.action.VIEW"/>\n <category android:name="android.intent.category.DEFAULT"/>\n <category android:name="android.intent.category.BROWSABLE"/>\n <data android:scheme="http"/>\n <data android:scheme="https"/>\n <data android:mimeType="text/html"/>\n <data android:mimeType="text/plain"/>\n <data android:mimeType="application/xhtml+xml"/>\n \n "
]
},
{
"contentProviders": [],
"metadata": [],
"broadcastReceivers": [],
"broadcastReceiver": [],
"libraries": [],
"services": [],
"type": "com.sunny.CustomWebView.CustomWebView",
"androidMinSdk": ["21"],
"activityMetadata": [],
"assets": [],
"native": [],
"permissions": [
"android.permission.ACCESS_FINE_LOCATION",
"android.webkit.resource.AUDIO_CAPTURE",
"android.launcher.permission.INSTALL_SHORTCUT",
"android.permission.VIBRATE",
"android.permission.MODIFY_AUDIO_SETTINGS",
"android.permission.CAMERA",
"android.permission.RECORD_AUDIO",
"android.permission.WRITE_EXTERNAL_STORAGE",
"android.webkit.resource.VIDEO_CAPTURE",
"android.permission.ACCESS_DOWNLOAD_MANAGER",
"com.google.android.gms.permission.AD_ID"
],
"activities": []
},
{
"contentProviders": [],
"metadata": [],
"broadcastReceivers": [],
"broadcastReceiver": [],
"libraries": [],
"services": [],
"type": "com.sunny.CustomWebView.DownloadHelper",
"androidMinSdk": ["21"],
"activityMetadata": [],
"assets": [],
"native": [],
"permissions": ["com.google.android.gms.permission.AD_ID"],
"activities": []
}
]

Is it correct?

No, but it'll work.

Capture1


Capture3

why error?

You have to add permission name only.
Remove tools node part.

as my app does not contain ad so google says to add tools node part

WHO CAN I DO THATstrong text

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.