Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

check GPS and Location status on/off on Android

$
0
0

Hi there, I'm working on an app where location services functionalities have maximum importance.

Basically I need to check that both GPS and Network Location services are activated in Android settings before proceeding to the next step.

When neither of these are checked, Ti.Geolocation.locationServicesEnabled is false, which is correct. Although after checking either GPS o Network Location services (either one), Ti.Geolocation.locationServicesEnabled becomes true, so in this sense I don't have a way to distinguish which of the interfaces (GPS or Network Location) has been activated.

I am compiling with Titanium SDK 3.1.0/3.1.1 for Android 4.0. Tests are being runned on an Acer A210 tablet. Titanium Studio is version 3.1.1.

Has anyone enountered any similar situation? Is there any workaround applicable for these kind of issues?, I have gone through quite a few but with no luck yet.

I also have been several times through Titanium 3.X documentation regarding Ti.Geolocation, and there doesn't seem to be any property that can indicate GPS status, neither any method to call for similar purposes.

I understand this is quite simple to do with Java code, but I'm not quite sure it's possible to integrate Java code to a Titanium app.

Any help? Thanks a lot, Adrian


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>