|
| Iniciado por guest, 10,nov. 2017 14:28 - No hay respuesta |
| |
| | | |
|
| |
| Publicado el 10,noviembre 2017 - 14:28 |
Hi Everyone,
I need to check if Location has been enabled on both android and ios devices before opening a window. The window will track the device's location every 5 minutes whether the device has moved or not so I want to be sure I'm getting gps coordinates. I run the following code but GPSStatus always returns 1 (GPSEnabled) no matter if Location is on or off so I have resorted to checking the longitude. Is there a way to check the status of Location? I've run this on both my android tablet and phone.
GPSInitParameter(gpsAuto,gpsPrecisionHigh+gpsEnergyLow)
Info(GPSStatus())
IF GPSStatus() = gpsEnabled OR GPSStatus() = gpsAvailable THEN myGPS = GPSGetPosition(500,"Getting GPS Position")
IF myGPS..Longitude <> 0 THEN OpenMobileWindow(WIN_Shift, Clients.ClientID) ELSE Info("Unable to get GPS position. Verify Location is enabled.") END ELSE Info("Location must be enabled") END
Thanks, Bill |
| |
| |
| | | |
|
| | | | |
| | |
|