Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is READ_GSERVICES permission still required for Google Maps?

Tags:

To add Google Maps to your android application, you need to include a few permissions:

<!-- Required --> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/> <!-- Optional --> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> 

However, by checking Google Maps Android API v2 documentation again, I noticed that

com.google.android.providers.gsf.permission.READ_GSERVICES 

is no longer required. I tested it by removing it from AndroidManifest.xml and the map is loading fine without any problems.

So, my question is.. what is/was the purpose of READ_GSERVICES permission?

Note: Even though it is removed from Google Maps Android API v2 documentation, it can be found on Google Maps API for Business documentation.

like image 650
user2896182 Avatar asked Jul 07 '14 19:07

user2896182


1 Answers

All permissions you need for Google Maps Android API are in the docs:

You must also request the android.permission.WRITE_EXTERNAL_STORAGE permission.

Note: If you're targeting the Android M SDK (23) and the latest version of the Google Play services SDK (8.1), you no longer need the WRITE_EXTERNAL_STORAGE.

From the next release of the Google Play services SDK, the requirement for the WRITE_EXTERNAL_STORAGE permission will be completely dropped from the Google Maps Android API.

So the answer is NO, you don't need it if you use current latest GPS, i.e. 8.1.0.

like image 116
Marian Paździoch Avatar answered Sep 20 '22 12:09

Marian Paździoch