Turn off GPS after use?
To get a decent location you have to add an event listener on location and wait for a couple of events. However, there doesn't seem to be a straight forward way to turn it off. The closest I have found is some old documentation, but the API has changed drastically since then. I don't want to drain the users battery, 3 events is fine…I'm not tracking just locating them.
1 Answer
-
Removing the event listener for 'location' will turn off the radio
For example:
Ti.Geolocation.removeEventListener('location', OnLocation);Of course, your function name may not be 'OnLocation'.
If you are using 'heading' then that event listener should also be turned off.