Android Question Does your app use advertising ID?

davemorris

Active Member
Licensed User
Longtime User
Hi, Guys
When publishing my App on Google Play, up to a few days ago I always answered NO to the question "Does your app use advertising ID?" (I don't have an advertising ID - or so I believe).
Now I have had to answer YES and tick the box "required for functionality" to get the App accepted by Google.

Could someone explain what is happening - I can't see anything wrong in my manifest file and I am not happy about answering YES to a question I don't really understand.

Manifest file:
'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"/>)
    
' Include to deal with problems with keyboard hidding part of Stripe payment page.
'SetActivityAttribute(aCardEntry, android:windowSoftInputMode, adjustResize|stateHidden)
    
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
' This line added for notification exp - otherwise a "Generating R file.    Error" occurred.
CreateResourceFromFile(Macro, Themes.DarkTheme)
'End of default text.

' These lines added for notification exp
'************ Required with GetSafeDirDefaultExternal ***********
AddManifestText(<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
)

' Added for Firebase
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
'**************************************

' Added for location services
' This is removed appears to causes uploading to google pay site "running bundletool build-apks on your uploaded App Bundle".
'   See post for more details https://www.b4x.com/android/forum/threads/error-found-multiple-meta-data-elements-for-key-com-google-android-gms-version-expected-at-most-one.144679/#content
'AddApplicationText(<meta-data
'   android:name="com.google.android.gms.version"
'  android:value="@integer/google_play_services_version" />)

AddPermission(android.permission.ACCESS_FINE_LOCATION)

' Added for non-https communications see https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/#content
' Don't appear to work.
' CreateResourceFromFile(Macro, Core.NetworkClearText)


Kind regards
Dave
 
Solution
Hi, Guys
When publishing my App on Google Play, up to a few days ago I always answered NO to the question "Does your app use advertising ID?" (I don't have an advertising ID - or so I believe).
Now I have had to answer YES and tick the box "required for functionality" to get the App accepted by Google.

Could someone explain what is happening - I can't see anything wrong in my manifest file and I am not happy about answering YES to a question I don't really understand.



' Added for Firebase
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)...

davemorris

Active Member
Licensed User
Longtime User
You can remove the permission if you don't need it:
Put this at the end of the manifest editor:
B4X:
RemovePermission(com.google.android.gms.permission.AD_ID)
HI Erel
Thanks for the input - I did added the line your suggested to the end of the manifest file.

However I still got the following error report. see attached I have to say I clicked on "Release without permission" to remove the error.

Currently, I don't use advertising (all my Apps are free). Note sure if that is the correct thing to do.

p.s. I appears that releasing an App to Google is getting more like filling out a tax return. You answer questions you don't really understand and hope they don't ask any questions.
GoogleError.JPG


Best of luck
Dave
 
Upvote 0

Neil Rohan

Member
Licensed User
Hi, Guys
When publishing my App on Google Play, up to a few days ago I always answered NO to the question "Does your app use advertising ID?" (I don't have an advertising ID - or so I believe).
Now I have had to answer YES and tick the box "required for functionality" to get the App accepted by Google.

Could someone explain what is happening - I can't see anything wrong in my manifest file and I am not happy about answering YES to a question I don't really understand.

Manifest file:
'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"/>)
   
' Include to deal with problems with keyboard hidding part of Stripe payment page.
'SetActivityAttribute(aCardEntry, android:windowSoftInputMode, adjustResize|stateHidden)
   
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
' This line added for notification exp - otherwise a "Generating R file.    Error" occurred.
CreateResourceFromFile(Macro, Themes.DarkTheme)
'End of default text.

' These lines added for notification exp
'************ Required with GetSafeDirDefaultExternal ***********
AddManifestText(<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
)

' Added for Firebase
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
'**************************************

' Added for location services
' This is removed appears to causes uploading to google pay site "running bundletool build-apks on your uploaded App Bundle".
'   See post for more details https://www.b4x.com/android/forum/threads/error-found-multiple-meta-data-elements-for-key-com-google-android-gms-version-expected-at-most-one.144679/#content
'AddApplicationText(<meta-data
'   android:name="com.google.android.gms.version"
'  android:value="@integer/google_play_services_version" />)

AddPermission(android.permission.ACCESS_FINE_LOCATION)

' Added for non-https communications see https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/#content
' Don't appear to work.
' CreateResourceFromFile(Macro, Core.NetworkClearText)


Kind regards
Dave
I received the same notification after adding firebase push services. I answered "yes" and checked the push notification box. That's all there was to it.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Hi, Guys
When publishing my App on Google Play, up to a few days ago I always answered NO to the question "Does your app use advertising ID?" (I don't have an advertising ID - or so I believe).
Now I have had to answer YES and tick the box "required for functionality" to get the App accepted by Google.

Could someone explain what is happening - I can't see anything wrong in my manifest file and I am not happy about answering YES to a question I don't really understand.



' Added for Firebase
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
'***********************************


Kind regards
Dave
Firebase uses the Ad_Id, so to be compliant you'll have to declare that you do use the Ad Id & you'll have to include the AD_ID permission in your manifest. Or if Push Notifications don't use the Ad Id (not sure if it does or not), remove the permission per Erel's instructions (I think Firebase adds it by default to your merged manifest) & then don't say you use it in your Advertising ID declaration in Play Console.

- Colin.
 
Last edited:
Upvote 0
Solution

davemorris

Active Member
Licensed User
Longtime User
Thanks everybody
I wondered why my app referred to Ad_id, it uses notifications.
I thought I had set up the App on its Google Dashboard incorrectly.


Dave
 
Upvote 0
Top