Google Play 显示隐含的 READ_EXTERNAL_STORAGE 权限 [英] Google Play shows the implicit READ_EXTERNAL_STORAGE permission

查看:63
本文介绍了Google Play 显示隐含的 READ_EXTERNAL_STORAGE 权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当 Android 4.1 JellyBean (API 16) 在 Google I/O 上宣布时,它引入了以下权限:

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

READ_EXTERNAL_STORAGE

READ_EXTERNAL_STORAGE

提供对外部存储的受保护读取访问.默认情况下,在 Android 4.1 中,所有应用程序仍然具有读取权限.这将在未来版本中更改,以要求应用程序使用此权限显式请求读取访问权限.如果您的应用程序已经请求写访问权限,它也会自动获得读访问权限.有一个新的开发者选项可以开启读取访问限制,让开发者可以根据 Android 未来的行为测试他们的应用程序.

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

我有一个以 API 16 为目标的应用程序,需要 WRITE_EXTERNAL_STORAGE 权限.我准备部署更新并注意到 READ_EXTERNAL_STORAGE 权限现在在开发人员门户中列为必需权限.对于上周部署的更新,它并未在 Google Play 中列为必需的权限.此应用程序未明确请求 READ_EXTERNAL_STORAGE 权限.

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.

已为此应用授予 WRITE_EXTERNAL_STORAGE 权限的用户在更新应用时是否会被提示授予额外的、隐式的 READ_EXTERNAL_STORAGE 权限?

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?

更新:

我们已经发布了应用程序,并且 JellyBean 设备会自动更新,而无需请求 READ_EXTERNAL_STORAGE 权限.在未来的版本中,当我明确声明对 READ_EXTERNAL_STORAGE 的要求时,是否会要求已经授予 WRITE_EXTERNAL_STORAGE 权限的用户授予 READ_EXTERNAL_STORAGE 权限?

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?

推荐答案

只要您有 WRITE_EXTERNAL_STORAGE,您就不必显式声明 READ_EXTERNAL_STORAGE.以前操作系统没有强制对外部存储进行只读访问,这种情况正在发生变化,您现在必须请求它.但是如果你有写权限,你就隐式地获得了读权限.

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.

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

如果您的应用需要读取外部存储(但不写入),则您需要声明 READ_EXTERNAL_STORAGE 权限...

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 ...

但是,如果您的应用使用 WRITE_EXTERNAL_STORAGE 权限,则它也隐含地拥有读取外部存储的权限.

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

这篇关于Google Play 显示隐含的 READ_EXTERNAL_STORAGE 权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆