Karumi / Dexter

Android library that simplifies the process of requesting permissions at runtime.
http://karumi.com
Apache License 2.0
5.23k stars 671 forks source link

Permissions dialog not restored correctly when pressing home #113

Closed edualonso closed 7 years ago

edualonso commented 7 years ago

Android's permission dialog is not restored if you press home while showing the permissions dialog and return to the activity that was showing it.

Actual behaviour

A DexterError.REQUEST_ONGOING is thrown. Obviously, this is correct, as I never allowed nor denied the permission, but I'm unable to continue the permission by using Dexter.withActivity(activity).continueRequestingPendingPermissions(permissionListener)

Expected behaviour

It should restore the dialog after calling Dexter.withActivity(activity).continueRequestingPendingPermissions(permissionListener).

Steps to reproduce

Request a permission Press home when the allow/deny dialog is shown Re-open the activity that showed the permissions dialog

Version of the library

3.0.2

pedrovgs commented 7 years ago

Maybe we should remove this feature. Votes?

edualonso commented 7 years ago

With "remove this feature" you mean drop existing permission requests all along and allow to request fresh permissions when this occurs, right? If so, then I give you a +1 too.

pedrovgs commented 7 years ago

Yeap.

pedrovgs commented 7 years ago

The feature is too complex, the implementation is difficult and does not add value at all.

edualonso commented 7 years ago

Cool, looking forward to request new permissions without being blocked by previous requests.

ps. gracias por responder cagando leches ;-)

pedrovgs commented 7 years ago

xD no problem @edualonso. If we won the YES in this vote and you want to collaborate implement this feature it could be great :)

mikejeep commented 7 years ago

I came on here specifically because I was experiencing this same issue. Certainly in favor of this resolution, although I'm sorry I am a novice and wouldn't be much help implementing it.

Serchinastico commented 7 years ago

We will remove the feature, people using Dexter is already doing something like asking for the permissions in the activity start up just in case so... :+1:

pedrovgs commented 7 years ago

@edualonso I've sent a PR. Can you check the behaviour is the one you expect.

Serchinastico commented 7 years ago

Version 4.0.0 has now been released!

stoefln commented 5 years ago

Exactly this is happening for me in version 5.0.0 on wear os!

felipe-silvestre-morais commented 5 years ago

This is still happening in version 5.0.0