Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Create a silent version to check permissions that doesn't crash if already doing it #53

Closed
Serchinastico opened this issue Mar 28, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@Serchinastico
Copy link
Contributor

There seems to be a problem with the current usage of the library, people is often surprised with the Only one Dexter request at a time is allowed exception and are forced to write a snippet similar to:

if (!Dexter.isRequestOngoing()) {
      Dexter.checkPermission(someListener, Manifest.permission.RECORD_AUDIO);
}

We can simplify the library usage by removing the exception and notifying an optional callback if there is a problem instead of forcing everyone to handle that scenario. Adding a new parameter to every Dexter method to pass the optional callback seems to be a non-scalable option but the only one compatible with the current implementation.

Thoughts are welcome!

@afaucogney
Copy link

I'm new to Dexter, and have not much experience with Permissions Management in 6, but I face this issue as well.
Sometime I need to request the permission to continue the user scenario, but I can't because another permission has not been resolve by the user (put in background, still not sure if this is WAKE_LOCK permission or FLAG_KEEP_SCREEN_ON feature).

In some use case, I need to force request, and cancelling others. If that would be possible.

eg : the user ask taking photo, but dexter is requesting something else on a service/application/activity

@Serchinastico Serchinastico added this to the 3.0.0 milestone Apr 25, 2016
@pedrovgs
Copy link
Contributor

My suggestion is to remove this exception and replace it with a Log.i call. What do you think @Serchinastico ?

@Serchinastico Serchinastico self-assigned this Jul 21, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants