Coder Social home page Coder Social logo

Comments (5)

getActivity avatar getActivity commented on August 28, 2024
image

from xxpermissions.

getActivity avatar getActivity commented on August 28, 2024

小伙子,你确定这个问题文档上面没写?

from xxpermissions.

429322426 avatar 429322426 commented on August 28, 2024

如果当前项目在没有适配分区存储的情况下,申请 READ_EXTERNAL_STORAGE 和 WRITE_EXTERNAL_STORAGE 权限

当项目的 targetSdkVersion >= 29 时,需要在清单文件中注册 android:requestLegacyExternalStorage="true" 属性,否则框架会抛出异常,如果不加会导致一个问题,明明已经获取到存储权限,但是无法在 Android 10 的设备上面正常读写外部存储上的文件。

当项目的 targetSdkVersion >= 30 时,则不能申请 READ_EXTERNAL_STORAGE 和 WRITE_EXTERNAL_STORAGE 权限,而是应该申请 MANAGE_EXTERNAL_STORAGE 权限

如果当前项目已经适配了分区存储,那么只需要在清单文件中注册一个 meta-data 属性即可:

是这部分的描述吗? 我的应用需要上架谷歌商店 ,所以没有必要是不能去申请 MANAGE_EXTERNAL_STORAGE 权限的。

from xxpermissions.

getActivity avatar getActivity commented on August 28, 2024

@429322426 不要随随便便拿点东西就贴到 issue,你先回去把框架的首页文档和疑问文档,仔仔细细,一字不落完整看一遍。

from xxpermissions.

429322426 avatar 429322426 commented on August 28, 2024

轮子哥谢谢了 ,我根据这一段描述去做的修改 ,现在可以正常执行了。

所以大家在使用 XXPermissions 的时候,直接拿新的权限去申请就可以了,完全不需要关心新旧权限的兼容问题,框架会自动帮你做处理的,与其他框架不同的是,我更想做的是让大家一句代码搞定权限请求,框架能做到的,统统交给框架做处理。

from xxpermissions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.