Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Play shows the implicit READ_EXTERNAL_STORAGE permission

When Android 4.1 JellyBean (API 16) was announced at Google I/O, it introduced the following permission:

READ_EXTERNAL_STORAGE

Provides protected read access to external storage. In Android 4.1 by default all applications still have read access. This will be changed in a future release to require that applications explicitly request read access using this permission. If your application already requests write access, it will automatically get read access as well. There is a new developer option to turn on read access restriction, for developers to test their applications against how Android will behave in the future.

http://developer.android.com/about/versions/android-4.1.html#Permissions

I have an application that tagets API 16 and requires the WRITE_EXTERNAL_STORAGE permission. I am preparing to deploy an update and noticed that the READ_EXTERNAL_STORAGE permission is now listed as a required permission in the developer portal. It was not listed as a required permission in Google Play for an update deployed last week. This application does not explicitly request the READ_EXTERNAL_STORAGE permission.

Will users who have already granted the WRITE_EXTERNAL_STORAGE permission for this application be prompted to grant the additional, implicit READ_EXTERNAL_STORAGE permission when they update the application?

Update:

We have since released the app and JellyBean devices are automatically updating without requesting the READ_EXTERNAL_STORAGE permission. In a future release when I explicitly declare the requirement for READ_EXTERNAL_STORAGE, will users who have already granted the WRITE_EXTERNAL_STORAGE permission be asked to grant the READ_EXTERNAL_STORAGE permission?

like image 755
James Wald Avatar asked Oct 19 '12 14:10

James Wald


People also ask

Why does your app need to use the All files access permission?

When should you request the All files access permission? You should only access the All files access permission when your app cannot effectively make use of the more privacy-friendly best practices, such as the Storage Access Framework or the Media Store API.

How do I manage external storage permissions in Android?

On the Settings > Privacy > Permission manager > Files and media page, each app that has the permission is listed under Allowed for all files. If your app targets Android 11, keep in mind that this access to "all files" is read-only.

What is Android permission write EXTERNAL storage?

To read and write data to external storage, the app required WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE system permission. These permissions are added to the AndroidManifest. xml file. Add these permissions just after the package name.

What does all files access mean?

Android 11 offers an “All Files Access” capability. The idea is that if your app requests the MANAGE_EXTERNAL_STORAGE permission, and the user grants it, that you would have unfettered access to most of external and removable storage.


2 Answers

You won't have to explicitly declare READ_EXTERNAL_STORAGE so long as you have WRITE_EXTERNAL_STORAGE. Previously the OS didn't enforce readonly access to the external storage, that is changing and you must request it now. But if you have write access you implicitly get read access.

From http://developer.android.com/training/basics/data-storage/files.html

If your app needs to read the external storage (but not write to it), then you will need to declare the READ_EXTERNAL_STORAGE permission ...

However, if your app uses the WRITE_EXTERNAL_STORAGE permission, then it implicitly has permission to read the external storage as well.

like image 153
smith324 Avatar answered Sep 20 '22 07:09

smith324


Since API 19 (Android 4.4) you must explicitly specify READ_EXTERNAL_STORAGE permission. Yes, if you have WRITE_EXTERNAL_STORAGE permission you will be implicitly granted READ_EXTERNAL_STORAGE but if you need a read-only access to external storage you must specify READ_EXTERNAL_STORAGE.

Prooflink: http://developer.android.com/reference/android/Manifest.permission.html#READ_EXTERNAL_STORAGE

like image 41
keaukraine Avatar answered Sep 18 '22 07:09

keaukraine