permissions-dispatcher / PermissionsDispatcher

A declarative API to handle Android runtime permissions.
https://github.com/permissions-dispatcher/PermissionsDispatcher
Apache License 2.0
11.21k stars 1.44k forks source link

Is there a member function for PermissionRequest class to never ask again ? #694

Closed ramseth001 closed 3 years ago

ramseth001 commented 3 years ago

In the @OnShowRationale annotation method, we have a default parameter object request: PermissionRequest.

This object has two methods: Allow and Deny. I am just wondering whether you have any plans to add "NeverAskAgain" method in the future, or there is a similar type of method ?

new AlertDialog.Builder(this)
                .setPositiveButton("ALLOW", (dialogInterface, i) -> request.proceed())
                .setNegativeButton("DENY", (dialogInterface, i) -> request.cancel())
                .setCancelable(false)
                .setMessage(rationaleText)
                .show();

I just thought it would be useful if there is a third method like request.neverAskAgain().

ramseth001 commented 3 years ago

device-2020-11-13-094657

hotchemi commented 3 years ago

@ramseth001 the option neverAskAgain is automatically added if the user has denied the permission request and we can't select we should add the option or not. Does that make sense?

ramseth001 commented 3 years ago

@hotchemi I understand it. Just wanted to make sure whether there is any way to achieve it.