Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If less than API-23 then permissions should be treated as granted #18

Closed
arberg opened this issue Apr 7, 2022 · 2 comments
Closed

If less than API-23 then permissions should be treated as granted #18

arberg opened this issue Apr 7, 2022 · 2 comments

Comments

@arberg
Copy link

arberg commented Apr 7, 2022

I noticed this:

suspend fun requestPermissionsAsync(context: Context, vararg permissions: String): PermissionResult {

        if (isTargetSdkUnderAndroidM(context)) {
            return PermissionResult.Denied.JustDenied(permissions.toList())
        }

Before Android-23 all permissions are granted without asking user, just by declaring in manifest. So this should return Granted. Like rxPermission does in isGranted here:

https://github.com/tbruyelle/RxPermissions/blob/master/lib/src/main/java/com/tbruyelle/rxpermissions3/RxPermissions.java

@deva666
Copy link
Owner

deva666 commented Apr 8, 2022

Yes, makes sense. Will be updated in the next version

@arberg
Copy link
Author

arberg commented Apr 28, 2022

Great, it works, tested in 2.2.0. I have commented in greater detail here: #19 (comment)

@arberg arberg closed this as completed Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants