Hello,
I am following the below link for GPS enabled service at B4xPages.
https://www.b4x.com/android/forum/threads/fusedlocationprovider-resolution-dialog.111652/
But when I am enabling GPS service at the device the dialog is not showing. Whereas the below code is running at B4A and the GPS enabled dialog is showing as expected.
I am running the same code at B4xPages, but the resolution dialog is not showing.
Please advice
Thanks
I am following the below link for GPS enabled service at B4xPages.
https://www.b4x.com/android/forum/threads/fusedlocationprovider-resolution-dialog.111652/
But when I am enabling GPS service at the device the dialog is not showing. Whereas the below code is running at B4A and the GPS enabled dialog is showing as expected.
I am running the same code at B4xPages, but the resolution dialog is not showing.
B4X:
Log("gps check")
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For B4XPage_PermissionResult (Permission As String, Result As Boolean)
If Starter.flp.IsConnected = False Then
SetState("Location provider not available")
End If
If Result Then
Dim rs As ResumableSub = Starter.CheckLocationSettingStatus() 'CallSub(Starter, "CheckLocationSettingStatus")
Wait For (rs) Complete (SettingsResult As LocationSettingsResult)
Dim sc As StatusCodes
Select SettingsResult.GetLocationSettingsStatus.GetStatusCode
Case sc.SUCCESS
SettingsAreGood
Case sc.RESOLUTION_REQUIRED
SetState("RESOLUTION_REQUIRED")
SettingsResult.GetLocationSettingsStatus.StartResolutionDialog("srd")
Wait For srd_ResolutionDialogDismissed(LocationSettingsUpdated As Boolean)
If LocationSettingsUpdated Then
SettingsAreGood
Else
SetState("Not enabled")
End If
Case Else
SetState("Not available")
End Select
Else
SetState("No permission")
End If
Please advice
Thanks