PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WM 19 Android - gpsEnabled
WM 19 Android - gpsEnabled
Iniciado por guest, 28,dic. 2014 19:10 - No hay respuesta
Publicado el 28,diciembre 2014 - 19:10
Hi,

I need to check if GPS is working on a device, and ask the user to turn it on if it isn't.

I have tried methods using example code from PC Soft, as below. I have turned off GPS and Location Services on my device, but I don't get the messages. At present the only way I can check if a position has been located is to see if longitude <>0.

Any solutions please? I have installed the GPS example, turned off the location and that doesn't recognise the GPS is not enabled either.

Thanks

Pete



// check 1
// Checks the status of the GPS provider
IF GPSStatus() = gpsDisabled THEN
Info("The geo-localization is not enabled.")
END



// Check 2
// Is the GPS enabled?
IF GPSStatus() <> gpsEnabled THEN
Error(“The GPS will not operate.”,“Enable it to access this application.”)
END



//Check 3
IF GPSStatus() = gpsUnavailable THEN
Info(" The geo-localization is not available.")
END