简体   繁体   中英

Google Maps and Location API - offline

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM