Hello
I need to show the Request location permissions | Android Developers settings page for this. Does anyone know the instent string for this. I amcurrently using this method:
I need to find the correct intent to show :
Regards
John.
I need to show the Request location permissions | Android Developers settings page for this. Does anyone know the instent string for this. I amcurrently using this method:
B4X:
Sub check_permissions_location
Dim rp As RuntimePermissions
Dim p As Phone, locationResult As Boolean
' // location permissions
rp.CheckAndRequest(rp.PERMISSION_ACCESS_COARSE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If p.SdkVersion >= 29 Then
rp.CheckAndRequest("android.permission.ACCESS_BACKGROUND_LOCATION")
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
Log(Result)
locationResult = Result
End If
' // https://www.b4x.com/android/forum/threads/setting.72447/#content
' // https://developer.android.com/reference/android/provider/Settings#ACTION_LOCATION_SOURCE_SETTINGS
If Not(locationResult) Then
Dim StartIntent As Intent
StartIntent.Initialize("android.settings.MANAGE_APPLICATIONS_SETTINGS", "")
StartActivity(StartIntent)
End If
End Sub
I need to find the correct intent to show :
Regards
John.