Giter Site home page Giter Site logo

Comments (6)

getActivity avatar getActivity commented on June 10, 2024

小伙子,我没理解你说的二方库是什么意思?

from xxpermissions.

gentrio avatar gentrio commented on June 10, 2024

就当是module好了,当module targetsdkversion高于application targetsdkversion时,并且跑在高版本的系统上(module 的target),此时例如申请POST_NOTIFICATIONS 权限会收不到回调

from xxpermissions.

yuzhiqiang1993 avatar yuzhiqiang1993 commented on June 10, 2024

你的二方库不要指定targetsdkversion不就完了

from xxpermissions.

gentrio avatar gentrio commented on June 10, 2024

你的二方库不要指定targetsdkversion不就完了

二方库的 targetVersion 是为了适配任意 targetSdkVersion 的 application;目前的问题是Application使用了低 targetVersion 但运行在高版本系统上时,如果申请了高版本的权限,XXPermission 并不会收到回调,因为系统也不会给回调。

XXPermission 本来对于低版本系统的高版本权限是通过 PermissionChecker.optimizeDeprecatedPermission 来做了权限转换,但比如对 POST_NOTIFICATIONS 的处理却只做了运行时系统版本判断,没有做应用的目标版本做判断,就会造成完全没有回调的情况。

目前看下来,框架虽然做了高低版本的权限适配,但是判断的条件并不充分,所以仅使用最新的权限没办法适配所有 Build.Version 和 targetSdkVersion的 情况。

from xxpermissions.

getActivity avatar getActivity commented on June 10, 2024

小伙子,POST_NOTIFICATIONS 属于 Android 13 的权限,一旦申请了这个权限,框架会强制要求项目的 targetSdkVersion 要大于等于 33,具体的方式是抛异常出来,你是不是通过 unchecked 方法来屏蔽了这个策略?

from xxpermissions.

getActivity avatar getActivity commented on June 10, 2024

超过两个星期没有响应,自动关闭此 issue。

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.