Guys can you tell me the better way to check the status of GPS for an android application? I want to make a control to check if it is turned off or on.
Im debugging from an Galaxy S4 mini with Android 4.4.2, thank you.
GPS Status Android
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: GPS Status Android
Maybe this:
See http://livecode.wikia.com/wiki/MobileSensorAvailable
Code: Select all
if mobileSensorAvailable("location") is "true" then
answer "GPS is ON!!!"
end if
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
-
- Posts: 2
- Joined: Fri Oct 28, 2016 2:46 pm
Re: GPS Status Android
This function return me true every time (GPS on and even with GPS off), I think that this function return true if the GPS is physically available in the device not if it's on or off.
Re: GPS Status Android
Try with: mobileCanTrackLocation(), see http://livecode.wikia.com/wiki/MobileCanTrackLocation
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w