Google Maps No Longer Requires STORAGE Permission!

Tahsin Dane
Oct 18, 2015 · 3 min read

Update: With the release of Google Play Services 8.3, the need for the Storage permission is completely dropped. You can safely remove the permission completely now. Here is the official documentation:

If you’re targeting version 8.3 or later of the Google Play services SDK, you no longer need theWRITE_EXTERNAL_STORAGE permission to use the Google Maps Android API.

For a long time, Google Maps Android SDK requires us to have WRITE_EXTERNAL_STORAGE permission. It was not the case when they first released the SDK. About 2 years ago, I was using the Maps fine in my application and suddenly with an update, I had the following crash:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tasomaniac.example/com.tasomaniac.example.MapActivity}: java.lang.SecurityException: The Maps API requires the additional following permissions to be set in the AndroidManifest.xml to ensure a correct behavior:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

I didn’t want to have that storage permission first. In fact, I worked too hard to avoid that. I desperately added the permission with no luck. Even worse, it blocked our auto-update in Google Play because we had a new permission.

For years, we lived with that.

The permission description says that the application can access files on the devices such as images, videos or audio.

Image for post
Image for post
Play Store Dialog with WRITE_EXTERNAL_STORAGE permission

I had lots of 1 stars in my app because of this. Users say that “Why do you request access for my photos and videos?”. They are right! They are always right. I don’t want to access your photos and I won’t. I am forced to have that permission.

Android Marshmallow brought us runtime permissions. They are great! Users do not see permissions when they install or update the app. Users have more control over the app’s functionality; for example, a user could choose to give a camera app access to the camera but not to the device location.

But imagine you have an app with Google Maps integration, and imagine you have to request WRITE_EXTERNAL_STORAGE on runtime to show the map. How would you explain that to users? Runtime permissions that are not obvious and require explanation are the worse. This is one of them.

Fortunately, they fixed the issue and removed storage permission. But not for all, just for Android Marshmallow.

If you use Google Maps and you want to target Android Marshmallow, this is what you need to do:

  • First you need to use Google Play Services 8.1.0
  • Second, you need to add maxSdkVersion property in your permissions as shown below:
android:maxSdkVersion="22" />
android:maxSdkVersion="22" />

They also say in the documentation that they will remove it completely in the next release.

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.


Please do the described changes in your application if you have Google Maps and want to target Android M!

I will update the post when they remove the permission necessity for good.

Note: Here is a great talk by Ian Lake from Big Android BBQ 2015 about Storage Permission in general:

Follow me on Twitter, Google+ and Medium.

Google Developers Experts

Experts on various Google products talking tech.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store