Closed Bug 1240705 Opened 8 years ago Closed 3 years ago

Show rationale for requesting a permission if needed

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: sebastian, Unassigned)

References

Details

The patches for runtime permissions (bug 1212830) didn't add any additional UI. Android has an API call to check whether the app should show UI with rationale for requesting a permission:

> ActivityCompat.shouldShowRequestPermissionRationale
> 
> Gets whether you should show UI with rationale for requesting a permission. You 
> should do this only if you do not have the permission and the context in which 
> the permission is requested does not clearly communicate to the user what would 
> be the benefit from granting this permission.
> 
> For example, if you write a camera app, requesting the camera permission would 
> be expected by the user and no rationale for why it is requested is needed. If 
> however, the app needs location for tagging photos then a non-tech savvy user 
> may wonder how location is related to taking photos. In this case you may 
> choose to show UI with rationale of requesting this permission.
There are three states that we can catch with shouldShowRequestPermissionRationale(). Let's add them to the Permissions class (as needed):

* Before requesting a permission: If the context does not clearly communicate why the permission is needed: "We need this for X. Okay?" -> Prompt user 
* After rejecting a permission: If the permission has been denied: "We really need this. Do you want to accept now?" -> Prompt again
* After permanently rejecting a permission: "Oooooh. Really?" -> Link to App permission settings (Can't prompt again)

Not all of those are always needed; This heavily depends on the situation and permission.
Blocks: 1450762
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.