0

I am creating an application, and I need to create a map tracking service. I currently use the native GPS Location Manager for android and OSMDroid for the maps. Anyways I am having problems with the maps, and even Android suggests using the Google Location API, instead of their native.

I've had some issues doing it this way, so I check an application called Strava, and it uses the Google Maps API and I suppose they use the Google location API too. But I have had some issues while implementing this, because it asks for keys to the users, so it is necessary to have internet connection to be able to use these APIs, even though Strava works offline.

I don't know how these google APIs can be used offline without major inconvenience, and how am I supposed to do it? I can't find any reliable information about this nowhere.

Laurel
  • 5,965
  • 14
  • 31
  • 57
8370
  • 153
  • 10
  • google maps does not work offline unless you have the tiles cached and location should work fine – tyczj May 31 '16 at 15:07
  • Possible duplicate of [Offline mode for android app using google maps api](http://stackoverflow.com/questions/16525822/offline-mode-for-android-app-using-google-maps-api) Come on, it was even in a comment on your other question! – Laurel Jun 04 '16 at 03:08

1 Answers1

0

I don't think that the google location services API works offline. The whole point of using it is to leverage the power of their cloud-based engine. if you need to work with geolocalization offline, your best bet is probably the native locationManager.

I found the page below, on the location strategies, very interesting. It specifically talks about the native location API.

https://developer.android.com/guide/topics/location/strategies.html

Fawzi Dev
  • 1
  • 2
  • I did not think neither, but as I was not sure I implemented it using the `PRIORITY_HIGH_ACCURACY` flag, and it is working pretty much better than I was doing with the native location manager. I was using and following the location strategies you just suggested me but what I am doing was turning it pretty complex. Thanks for the answer anyways. – 8370 Jun 02 '16 at 21:14
  • check [this answer](http://stackoverflow.com/questions/16525822/offline-mode-for-android-app-using-google-maps-api) out. – Mehran Zamani Apr 15 '17 at 11:18