1

An application which uses Google Maps Api 2 has the advantage that all fetched map information are stored. Therefore they are available even when offline (no WiFi and no GSM). But if Internet is available it will download new data (the same data again) which is expensive when GSM is used.

Now I don't want to disable GSM entirely for Android. But only for the google maps object or say the application itself. I can't find any API function which can help me in order to allow googleMaps to (re-)download map information only when WiFi is available. So I have the choice between no internet at all or a pricy internet (when the application with google maps is active and already downloaded map information are redownloaded).

Is there a way to avoid this? Has anyone an idea how to override the regular googlemaps behaviour in order to control internet access or how a app can disable internet permission for itself temporary?

Thanks

Edit: To clarify - my question is: How can I disable the downloading of the tiles of a googlemap object without disable the object itself. I want to use the 'cached' tiles instead of redownloading it, which is expensive when using GSM. But I don't want to shut down GSM of my system so I'm available at chat clients e. g. whatsapp.

magoit
  • 11
  • 2

1 Answers1

-1

You can just identify the type of internet and then only call for certain methods if the proper type of internet is suitable for your needs.

In this answer from another post, you will find all you need to detect your type of internet:

https://stackoverflow.com/a/8548926/2074990

Community
  • 1
  • 1
bofredo
  • 2,348
  • 6
  • 32
  • 51
  • how is this going to stop the google map API from downloading the tiles? – tyczj Sep 24 '13 at 14:17
  • i was just pointing out how he can detect the internet-connection. He will have to write some checks before he instantiates a GoogleMap-object. – bofredo Sep 24 '13 at 14:38
  • To clarify - my question is: How can I disable the downloading of the tiles of a googlemap object **without** disable the object itself. I want to use the 'cached' tiles instead of redownloading it, which is expensive when using GSM. But I don't want to shut down GSM of my system so I'm available at chat clients e. g. whatsapp. – magoit Sep 24 '13 at 15:53