Hello,
Until Android 8 version, you could get IMEI as unique identifier. With the Android 10 version you can no longer. What can be the alternative to get a unique identifier? Greetings
Thanks!,
I was looking at the post (which in turn took me here https://support.google.com/googleplay/android-developer/answer/6048248?hl=en) but it seems that the end user can disable it when he decides to opt out of advertising. Meanwhile, I was thinking of a procedure that creates a random ID or it could be based on Date + Hour + Minutes + seconds in a file in an application folder (the first time) and use that ID as an alternative to IMEI. What do you think of my idea? How could it be done?
Greetings
Based on This StackOverflow alternatives of IME Sub GETUniqueID As String Dim JO As JavaObject Dim ID As String JO.InitializeContext ID = JO.RunMethod("getUniqueID", Null) Log(ID) Return ID End Sub #If Java import android.media.MediaDrm; import android.os.Build; import android.content.*...
Sub GUID As String Dim sb As StringBuilder sb.Initialize For Each stp As Int In Array(8, 4, 4, 4, 12) If sb.Length > 0 Then sb.Append("-") For n = 1 To stp Dim c As Int = Rnd(0, 16) If c < 10 Then c = c + 48 Else c = c + 55...
If you generated a just a 16 digit decimal number (as a string, say) then with a million users there would be only a one in ten billion chance of repeating the same identifier - a pretty safe solution. If you include letters then even six characters are more than enough.
The only problem with this approach is that the user's identity is lost if they uninstall and reinstall the app.
Based on This StackOverflow alternatives of IME Sub GETUniqueID As String Dim JO As JavaObject Dim ID As String JO.InitializeContext ID = JO.RunMethod("getUniqueID", Null) Log(ID) Return ID End Sub #If Java import android.media.MediaDrm; import android.os.Build; import android.content.*...
Sub GUID As String Dim sb As StringBuilder sb.Initialize For Each stp As Int In Array(8, 4, 4, 4, 12) If sb.Length > 0 Then sb.Append("-") For n = 1 To stp Dim c As Int = Rnd(0, 16) If c < 10 Then c = c + 48 Else c = c + 55...
Mr. @oparra you are a GENIUS !!!! ... Thank you, it works both in Android 8 and 10, it returns a unique 16 character ID for the device. This was what I needed! I have no words to thank you! You are on another level !!! Are you Brazilian? Greetings
Señor @oparra usted es un GENIO!!!!...Mil gracias, funciona tanto en Android 8 como 10, me devuelve un ID de 16 caracteres unico para el dispositivo.
Esto era lo que Yo necesitaba!
No tengo palabras para agradecerle! Usted esta en otro nivel !!!
¿Usted es Brasilero?
Saludos
If you generated a just a 16 digit decimal number (as a string, say) then with a million users there would be only a one in ten billion chance of repeating the same identifier - a pretty safe solution. If you include letters then even six characters are more than enough.
The only problem with this approach is that the user's identity is lost if they uninstall and reinstall the app.
Hi @Brian Dean Sure, I intended to make a function to try to solve the issue, but the information from @oparra is great, it solves my concern easily and without depending on special permissions that Android refuses to grant. Kind regards!
que tonto soy!!!!!...Despues me di cuenta que desde el avatar se puede saber la nacionalidad!!!!....Mil perdones @oparra ... el entusiamo me hace perder "cosas" de vista!!!
Gracias por desburrarme @José J. Aguilar ! Y de paso te pregunto?...como vas con el COVID ???
[Nota aparte: En mi caso: recien ayer me pude dar la primera dosis de la vacuna!]