Android Question PHONE STATE IN ANDROID 8

zavaree

Active Member
Licensed User
Longtime User
Hi
in some android 8 os device i get this error (not all android 8 device) . in set phone state in manifest but still error showing. please help me.thx
 

Attachments

  • error.jpg
    error.jpg
    62.8 KB · Views: 184

kisoft

Well-Known Member
Licensed User
Longtime User
Try adding this to your code, although I do not know if it will help.
B4X:
'starter
Dim rp As RuntimePermissions

'activiti(main)
    Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_PHONE_STATE)  '
    Wait For Activity_PermissionResult (Permission As String, PResult As Boolean)
    If PResult = False Then
        MsgboxAsync("No permission to access PHONE STATE", "")
        Return
    Else
        Dim pid As PhoneId
        Log("phone id: " & pid)
    End If
 
Upvote 0

zavaree

Active Member
Licensed User
Longtime User
ok . you say i set targetSdkVersion to 26 ?
This does not cause problems for other users?
 
Upvote 0
Top