Zerho
Zerho

Reputation: 1460

Geolocalization via Titanium

Hi I'm developing an app that needs the most accurate GPS localization. Using the method that uses "kitchen sink" to show all Titanium's possibilities it gives me the network geolocation, can I have the device detection?

PS: The project is actually developed for Android, but will be soon ported to iPhone.

Upvotes: 1

Views: 1773

Answers (2)

rivenate247
rivenate247

Reputation: 2101

If you are using TiStudio instead of TiDeveloper you can use the sample project GPS to start with. It's bundled in the download so just fire it up and use that code as a working copy to learn from. It's android ready as well :-)

Upvotes: 2

dolphy
dolphy

Reputation: 6498

So, to clarify, you're basing your code off of this example? And the issue is that you are getting network-based geolocation, instead of GPS-based geolocation?

Have you tried replacing the preferredProvider with Geolocation.PROVIDER_GPS, instead of the string "gps"? As in:

Ti.Geolocation.preferredProvider = Ti.Geolocation.PROVIDER_GPS;

Upvotes: 2

Related Questions