Android Question GetSubscriberId sometimes returns value and other times nothing.

vecino

Well-Known Member
Licensed User
Longtime User
Hi, something strange is happening to me lately, some tablets return a value when I run phi.GetSubscriberId and other times (the same tablet) return nothing, empty string.
Could it be a tablet failure?
Thank you.
B4X:
Sub getValor As String
  Dim rp As RuntimePermissions
  rp.CheckAndRequest(rp.PERMISSION_READ_PHONE_STATE)   
  Wait For Activity_PermissionResult (Permission As String,Result As Boolean)
  '
  Dim phi As PhoneId
  Return (phi.GetSubscriberId)                               
End Sub
 

vecino

Well-Known Member
Licensed User
Longtime User
Hey, none of these will work now?

phi.png


What is "use the advertiser id"?
Is there no other value that identifies a device physically?
Thank you.
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
Do not fear the search engine, it's both helpful and delivers results. First hit:
https://www.b4x.com/android/forum/pages/results/?query=advertiser+id

The advertising ID is a unique, user-resettable ID for advertising, provided by Google Play services.
Well, it's no use to me, I don't use "Google Play".

A random value is also useless because it does not identify a device. Just copy that identifier to another device and it's the same.

That's why I'm asking for a unique "physical" identifier that can't be matched on any other device.

Thank you.
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
Please don't "bump" your threads. I already gave you the complete answer on post #2. There are no accessible hardware ids on new versions of Android.
Sorry, I don't understand what I've done wrong.
How should I remind another user to help me, if they can?
 
Upvote 0
Top