Reputation: 2959
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
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
Reputation: 4384
This might be because of below two reason.
- 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.- 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.
- There was a bug in Google play services that causes unintended
WRITE_EXTERNAL_STORAGE
,READ_EXTERNAL_STORAGE
, andREAD_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
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
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
Reputation: 1893
This is missing :
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Upvotes: 0