26

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.

user2896182
  • 263
  • 1
  • 3
  • 4

2 Answers2

12

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.

Marian Paździoch
  • 8,813
  • 10
  • 58
  • 103
  • 2
    user2896182 is specific about com.google.android.providers.gsf.permission.READ_GSERVICES and you answered about WRITE_EXTERNAL_STORAGE. – Tankman六四 Feb 16 '16 at 02:41
  • 1
    user2896182 also asked a different question in his description than the one specified in the title. That question isn't answered, which is what Zhang probably means. EDIT: That question is apparently asked before: http://android.stackexchange.com/questions/98330/what-is-the-android-permission-write-gservices-doing – Revolutionair Feb 19 '16 at 15:37
4

NO, This persimmons is no longer required in google MAP API V2

    <permission
                 android:name="phonelocation.example.asuss550c.phonelocation.permission.MAPS_RECEIVE"
                 android:protectionLevel="signature" />  
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

You only need to add

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Also this MetaData in your Application Tag

   <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/google_maps_key" />
Hussein Alrubaye
  • 915
  • 8
  • 14