39

Is there a way to use the offline mode in Android apps using the Google Maps API?

Any direction to a tutorial or source code would be a massive help. I've been searching for hours without any luck. I know Google has released a way of using maps offline, but is it available for Android developers?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
PropK
  • 687
  • 2
  • 12
  • 24
  • 1
    It is not available for third party app developers. There are certain ways you can force cacheing but they are in violation of google's terms of service. – PravinCG May 13 '13 at 15:37
  • 1
    What about preloading maps before entering low internet areas? – PropK May 14 '13 at 09:19
  • I have the custom tiles, need to show them but getTile() does not get called on the first launch. I need to show custom tiles on first launch in airplane mode. can somebody help? @PropK – abhishek Dec 07 '16 at 18:10

1 Answers1

39

See this solution or this one. Basically you just create your own tileprovider and access tiles locally. It is totally doable with the v2 API. API Reference

There's some false information floating around out there that the v2 Google Maps API requires an Internet connection. There was a but where the API would require a single access after app install to verify with Google Play services, but I believe this has been fixed.

See this and this.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
rcarver
  • 963
  • 9
  • 13
  • @Simon 2nd link is shifted [here](https://github.com/cocoahero/android-gmaps-addons) – Ajith Pandian Oct 10 '16 at 07:44
  • I have the custom tiles, need to show them but getTile() does not get called on the first launch. I need to show custom tiles on first launch in airplane mode. can somebody help? @AjithPandian – abhishek Dec 07 '16 at 18:09
  • 8
    You need to connect to the maps API at least once to make cache of tiles. GoogleMaps API does not alow storing tiles outside service. You can see this here [https://developers.google.com/maps/terms#10-license-restrictions] refer 10.5.d. – Ajith Pandian Dec 08 '16 at 06:22