I am trying to get the Google Maps/FusedLocationProvider example to work, but I am finding the Permissions thing a bit confusing.
I've modified one of the functions so that it looks like this:
Sub Mapfragment1_Ready
gmap = MapFragment1.GetMap
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If gmap.IsInitialized Then
' Wait For LocationSource_Ready (Success As Boolean)
' If Success Then
' Log("Ready!!!")
' Dim jo As JavaObject = gmap
' jo.RunMethod("setLocationSource", Array(Starter.LocationSource))
' End If
End If
End Sub
In order to try and get it working, I have commented out the position injection section, but I am still getting a security error appearing, even though the dialog asking for permission shows up once I have cleared the "Your app appears to have crashed" dialog.
How do I get the code to wait until the permission is given before showing the map and injecting the location?
I've read the tutorial on permissions, but I am still unclear as to how to get the code to wait until the permission is granted before moving on to presenting the map and injecting the location using FusedLocationProvider.
Thanks for any help.
JMB