Using Activity_PermissionResult works fine as well. I was wondering if it's okay to be using Activity_PermissionResult instead of B4XPage_PermissionResult since the Activity_PermissionResult works.
This is how I request permission in all my project using B4XPage
B4X:
Sub Class_Globals
Private rp As RuntimePermissions
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
gmap = MapFragment1.GetMap
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For B4XPage_PermissionResult (Permission As String, Result As Boolean)
If Result Then
'Do Stuff Here
Else
Log("No permission!")
End If
End Sub
Am I supposed to replace B4XPage with the actual page name or leave it as default? I leave it as it is
I would hope so since I copied from examples found on this forum
The only thing is, sometimes the map or whatever permission I requested would never return to the B4XPage_PermissionResult event.
It'll ask for permission on first run ( from new install) and then it would work for the first time. When I exit the app and go back, nothing happens
When I change it to Activity_PermissionResult, it would then work fine.
would hope so since I copied from examples found on this forum
The only thing is, sometimes the map or whatever permission I requested would never return to the B4XPage_PermissionResult event.
It'll ask for permission on first run ( from new install) and then it would work for the first time. When I exit the app and go back, nothing happens
When I change it to Activity_PermissionResult, it would then work fine.