Applying of RuntimePermissionHandler
alex-philippov opened this issue · 2 comments
Hello, Thank you for this library.
Could you explain why I need RuntimePermissionHandlerProvider and RuntimePermissionHandler? It would be nice if you give a case when I need to use it. I read wiki, but it is not clear for me what it is for. Thank you!
Hello, usually you shouldn't need to use a custom RuntimePermissionHandler
, the library's default should be enough.
You can use a custom RuntimePermissionHandler
/ RuntimePermissionHandlerProvider
to implement a different logic to manage a permission's request.
E.g.
With the library's default RuntimePermissionHandler
, if you request 3 permissions and accept only 2 of them, you will be notified only about the single denied permission (in this case, the method onDenied()
will be invoked with the denied permission and onAccepted()
won't be invoked). You need to accept all the permissions to be notified about them.
With a custom RuntimePermissionHandler
you can change the default logic so you can be notified about the accepted permissions even if the third permission of the same request was denied (in this case the method onDenied()
will be invoked with the third permission and onAccepted()
will be invoked with the other two).
Thank you!