QuickPermissions / QuickPermissions-Kotlin

The most easiest way to handle Android Runtime Permissions in Kotlin
Apache License 2.0
317 stars 40 forks source link

Option for handing OnPermissionDenied #1

Closed MrBIMC closed 6 years ago

MrBIMC commented 6 years ago

I'm moving from gradle-plugin-based QuickPermissions to this one and I can't seem to find handler for @OnPermissionsDenied, but rather only @OnPermanentlyDenied.

While it's logical that when user denies the permission default QP rationale shows dialog that notifies about importance of requested permissions, user still can press cancel.

As I understand developers supposed to handle default, before request state as "permission denied" state, but I don't think that's a correct approach for every situation and thus QuickPermissionsOptions should contain handler for onPermissionDenied in addition to onPermissionPermanently denied.

kirtan403 commented 6 years ago

Hi @MrBIMC . Your question is valid and to be honest, there is already callback provided. You can find permissionsDeniedMethod in QuickPermissionsOptions . Check out the advanced section, the last method mentioned there is what I am talking about. It's already there. Let me know if you face any trouble.

I'm glade that you liked QuickPermissions-Kotlin 😄

MrBIMC commented 6 years ago

Oh yeah, sorry, I somehow missed it from reading in README.

kirtan403 commented 6 years ago

It's okay. Happy coding 😄