Android Question Push Notifications, B4A 12.0 and Advertising ID permission

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
I am just updating an old app to API 33.

The app uses Push Notifications.

The build etc is fine but when I upload to Google Play for release I get the following message

1673359022259.png

I checked the built Manifest.xml and it contains this line:

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

I do not want to use an Advertising ID in this app. Is this now a requirement when using Push Notifications?

If not, how can I remove.

My Manifest is quite simple.
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="33"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)
'End of default text.


'Icon

SetApplicationAttribute(android:icon, "@mipmap/ic_launcher")
CreateResource(mipmap-anydpi-v26, ic_launcher.xml,
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/background"/>
<foreground android:drawable="@mipmap/foreground"/>
</adaptive-icon>
)


'Set up keyboard handling for scrolling
SetActivityAttribute(Main, android:windowSoftInputMode, adjustResize|stateHidden)
'**************************************


CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)

'*****************ANDROID PUSH NOTIFICATIONS ********************
AddPermission(android.permission.POST_NOTIFICATIONS)
'****************************************************************
 

asales

Expert
Licensed User
Longtime User
Very strange.
I checked all my apps and they have this permission too in the manifest (and mostly was update in the last month).
B4X:
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
I changed one this apps to use the SDK target = 33 and uploaded to the Play Store, using the B4A 12.2 to test.
I checked that the app don't use Advertising ID in the content of Play Console.
The upload is fine. I don't received this error message about Advertising ID.
 
Upvote 0

asales

Expert
Licensed User
Longtime User
Edit:
I updated another app - using the API = 33 - and get the same error as yours.
I will try with the RemovePermission.

1673457387985.png

app não usa um ID de publicidade = app don't use advertising ID

and they has the permission.AD_ID in the manifest:
1673457609722.png
 
Last edited:
Upvote 0
Top