Android Question Permission READ_PHONE_STATE

Kiran Raotole

Active Member
Licensed User
I'm getting error of READ_PHONE_STATE permission.

Error :
java.lang.SecurityException: getDeviceId: Neither user 10200 nor current process has android.permission.READ_PHONE_STATE.

code:
B4X:
    Dim rp As RuntimePermissions
    rp.CheckAndRequest(rp.PERMISSION_READ_PHONE_STATE)
    
    Dim pid As PhoneId
    Log(pid.GetDeviceId)

manifest:
B4X:
AddPermission(android.permission.READ_PHONE_STATE)
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top