Android Question MapFragment1_Ready vs Permission

jcesar

Active Member
Licensed User
Longtime User
Hi

The rp.CheckAndRequest is not executed when i use Wait for Mapfragment1_Ready.

Only run if i remove that line.

B4X:
GPS.Initialize("gps")
    Wait For MapFragment1_Ready
    gmap = MapFragment1.GetMap
    rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
    Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
    If Result Then
        gmap.MyLocationEnabled = True
        GPS.Start(0, 0)
    Else
        Log("No permission!")
    End If
 

yfleury

Active Member
Licensed User
Longtime User
You check for permission after mapfrag waiting. I am not sure but Check permission before.
 
Upvote 0
Top