Coder Social home page Coder Social logo

Comments (6)

lisonge avatar lisonge commented on June 26, 2024 1

仅供参考的 AI 回复

image

from xxpermissions.

getActivity avatar getActivity commented on June 26, 2024 1

如果要解决你这个问题,其实有两个办法,你可以参考一下

  1. 在清单文件中静态注册权限的时候,不要带上 maxSdkVersion 属性,这样就不会触发框架的检测异常

  2. 在权限申请的时候,调用 .unchecked() 方法,表示不会进行任何权限检查,这样就不会触发框架的检测异常

from xxpermissions.

getActivity avatar getActivity commented on June 26, 2024

小伙子,你为什么要给权限加 maxSdkVersion 属性?

from xxpermissions.

gggcccwww avatar gggcccwww commented on June 26, 2024

存储一张图片到相册28 以前需要WRITE_EXTERNAL_STORAGE权限才可以,28以后压根就不需文件权限 所以自然的 这个权限WRITE_EXTERNAL_STORAGE 我得加个maxSdkVersion 属性哇。。。。大佬哇,这个参数就是设置不同权限的上限版本的哇

from xxpermissions.

getActivity avatar getActivity commented on June 26, 2024

@gggcccwww 不加会有什么问题?

from xxpermissions.

getActivity avatar getActivity commented on June 26, 2024

存储一张图片到相册28 以前需要WRITE_EXTERNAL_STORAGE权限才可以,28以后压根就不需文件权限 所以自然的 这个权限WRITE_EXTERNAL_STORAGE 我得加个maxSdkVersion 属性哇。。。。大佬哇,这个参数就是设置不同权限的上限版本的哇

小伙子,我认真思考了一下,你讲得确实有道理,但是 API 28 还不一定不需要权限,得看你怎么读写外部存储上面的文件,如果你是通过 ContentValues 的方式,确实不需要权限,但是如果是通过 File 的方式,则仍然需要写入文件权限,框架其实无法得知外层用的是哪种。

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.