For Each permission As String In Array(Starter.rp.PERMISSION_ACCESS_FINE_LOCATION, Starter.rp.PERMISSION_ACCESS_COARSE_LOCATION)
Starter.rp.CheckAndRequest(permission)
Wait For Activity_PermissionResult (permission As String, Result As Boolean)
If permission=Starter.rp.PERMISSION_ACCESS_FINE_LOCATION Then
CallSubDelayed(Starter, "StartGPS")
End If
' Log("permission " & permission & " = " & Result)
If Result = False Then
ToastMessageShow("No permission!", True)
Activity.Finish
Return
End If
Next