Android Question Get PhoneID on Android 10+ using android:targetSdkVersion="31"

CStorSupport

Member
Licensed User
Longtime User
Ho do i get PhoneID on Android 10+ using android:targetSdkVersion="31"?

Using Library "Phone" version 2.53 we tried this code
from your post in Android Question > Get unique id for user:

...
738 Dim phone As Phone
739 Log(phone.GetSettings ("android_id"))
...

and got this error on line 738:

Error occurred on line: 738 (Main)
java.lang.Exception: array not expected...
 

walterf25

Expert
Licensed User
Longtime User
It works just fine here, I have android:targetSdkVersion=31 as well I don't get any errors at all.
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
try line 738 in main.java in your objects/src/.../.../ folder. dig a little deeper there; you'll find it. the referenced line is not in your b4a source. the line where the error occurs in your b4a source will mentioned at line 738 in main.java. you can then go back to the ide and correct it.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…