i believe u can only request the location with runtimepermissions and then a os dialog popup if it is disabled.
B4X:
Sub Process_Globals
Dim rp As RuntimePermissions
B4X:
Sub Activity_Create(FirstTime As Boolean)
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
End Sub
B4X:
Sub Activity_PermissionResult(Permission As String, Result As Boolean)
If Permission = rp.PERMISSION_ACCESS_FINE_LOCATION Then
CheckBoxGPS.Checked = Result
If Result = False Then ToastMessageShow("please enable gps + give permissions ...",True)
End If
End Sub
it seems every change in location settings result in a user dialog, at least for newer os.
can't found a example to start the location service from code without user interaction.