i_raqz
i_raqz

Reputation: 2959

Android Manifest Permissions External Storage

I have the below permissions defined in the Manifest but I still see Android asking the app needs permission to write to External storage even though I don't want to access External Storage

Could it be because of Google Play services

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

Upvotes: 7

Views: 29544

Answers (5)

Hemina
Hemina

Reputation: 375

Pls try This for google play service error:

  <uses-permission
         android:name="android.permission.WRITE_EXTERNAL_STORAGE"
         android:maxSdkVersion="Version code" />

Metadata used end of application.

Upvotes: 6

Pravin Divraniya
Pravin Divraniya

Reputation: 4384

This might be because of below two reason.

  1. If you're targeting version 8.3 or later of the Google Play services SDK, you no longer need the WRITE_EXTERNAL_STORAGE permission to use the Google Maps Android API.
  2. If you're targeting earlier versions of the Google Play services SDK, you must request the android.permission.WRITE_EXTERNAL_STORAGE permission.

Check this link.

  1. There was a bug in Google play services that causes unintended WRITE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE, and READ_PHONE_STATE permissions to be merged into app manifests. That is solved in Google Play services 10.0 release. Check this.

To avoid this I recommend to include necessary individual Play service APIs and corresponding build.gradle descriptions. Check this.

Hope this will help you and future user also.

Upvotes: 1

promanowicz
promanowicz

Reputation: 429

It's almost a year since post publication but maybe this'll help someone. If you are using play-services version < 8.3 then play-services-maps uses this permission.

If you are not using play-services-maps then probably you are using play-services-fitness which takes maps as transitive dependency.

If you are not using nor of them, then probably you have other transitive dependency which needs this permission.

TIP to check transitive dependencies

Upvotes: 2

dileep
dileep

Reputation: 347

Add these permissions

<uses-permission android:name="ANDROID.PERMISSION.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="ANDROID.PERMISSION.WRITE_EXTERNAL_STORAGE"/>

Upvotes: 1

AnswerDroid
AnswerDroid

Reputation: 1893

This is missing :

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 

Upvotes: 0

Related Questions