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
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
I see that you haven't added the starter service to your project. This is in most cases a mistake.
Even if targetSdkVersion < 23 the user can manually remove the permission. Your best option is to set the targetSdkVersion to 26 and properly handle permissions.