Android Question Advertising ID 00000000-0000-0000-0000-000000000000

nima66

Member
Recently, when I set the SDK Target to 33, the AD-ID value of some users who probably have high Android is 00000000-0000-0000-0000-000000000.
In fact, the process of receiving gifts for the first registration is disrupted and the user can register and receive gifts multiple times.
Some write that we need to specify in the Google Play console that we want to receive ads and enable the option.
Well, maybe some, like me, have not published this application on Google Play. This is not because Google does not want to provide its ads to applications that are not published in its own market.
Some say that if the user has disabled ad personalization in Gmail connected to their phone, the value will be 0. I tested this and it was not the case.
Some say that if Google Play is not available, the value will be 0.

Of course, the necessary access has been added to the manifest.
B4X:
AddPermission(com.google.android.gms.permission.AD_ID)

What is the solution in the end?
Why doesn't Android give its developers a unique device identifier?
We've been struggling with a unique identifier for 9 years...
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
If the user deletes the advertising id in Android settings, it will be all zeros. If you're not publishing the app on Google Play, then you can create your own unique id.
https://support.google.com/googleplay/android-developer/answer/6048248

- Colin.
 
Upvote 0

nima66

Member
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
What they mean is that with App Set ID we can create a unique ID for the user's device and then it will provide it to us as an Advertising ID?
So is this possible in b4a?
Yeah you could use the App Set ID, but I'm not sure that it's really intended as a replacement for the advertising id. If you're in control of how the ID is sent you could just make up your own unique id.

- Colin.
 
Upvote 0

nima66

Member
Thanks
So whenever the AD_ID value is 00000000-0000-0000-0000-000000000000 I use the android_id.
I thought the use of android_id was not allowed recently.
I thought that recently the use of android_id was not allowed and that the value of android_id was not valid and fixed and would change with Android updates.
It is likely that the AD_ID value will change with the Android update.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
I didn't understand what you meant by this sentence.
From what you wrote in your OP it seems that you're not using the ad id for ads. You refer to "registering & receiving gifts" - so where are those gifts coming from? I assumed (possibly incorrectly) that they were coming from you, in which case you would be receiving & logging the ad id for that purpose. If that's the case, then you could use any unique id for this - so you could use the Android id instead.

- Colin.
 
Upvote 0

nima66

Member
I want to limit the user to one registration per device.
Because with registration there is a possibility of 10 days of free use of the application.
Most often a unique identifier is used to limit the gift, my gift is 10 days of free use
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…