Greetings,
I'm using the following code to get the READ_PHONE_STATE permission from the user, but the Request Permission screen is never called. Do I need to add anything to the manifest editor?
I'm using the following code to get the READ_PHONE_STATE permission from the user, but the Request Permission screen is never called. Do I need to add anything to the manifest editor?
B4X:
If Starter.rp.Check(Starter.rp.PERMISSION_READ_PHONE_STATE) = False Then
Sleep(100)
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_PHONE_STATE)
Wait For Activity_PermissionResult (permission As String, Result As Boolean)
Log(permission)
If Result = False Then
MsgboxAsync("The app asked for permission to read the phone state. This permission is " & _
"needed to allow the app to mute app sounds when you are on a call. " & _
"If you previously selected 'Don't ask again' then go to screen that has all " & _
"of your apps. Locate this app and long press on the app icon. A screen " & _
"will pop up. Tap App info and scroll until you find Permissions and tap it." & _
"You will find the Phone permission toggle. Tap it so it's 'On'", _
"Please allow this permission")
ImageViewExit_Click
End If
End If