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

Check if a permission CHANGED in MultiplePermissionsReport? #263

Closed carterhudson closed 4 years ago

carterhudson commented 4 years ago

I want to be able to check / request multiple permissions and receive a permission report that lets me examine whether the requested permissions have changed, rather than just what their current status is, since the listener gets triggered even if you're just using Dexter to check if you have permissions, and not necessarily requesting them. The purpose for this, in my use-case, is for hooking in analytics.

It seems like you can do this when requesting single permissions via onPermissionGranted & onPermissionDenied. Is there currently a way to do this when requesting multiple permissions?

Edit: I've implemented a workaround by not relying on Dexter for the initial permissions check. I manually check using the Android API first, and then only invoke Dexter if permissions are denied. This seems to give me the granularity I want, though I'd rather consolidate all of my permissions functionality to Dexter if possible. Perhaps the check() method should be request() instead?

pedrovgs commented 4 years ago

Hi @carterhudson I'm afraid this feature you are requesting is too specific and I don't think we should add it to Dexter. The current library implementation is full of features and the scenario you mention seems to be too specific for us. Sorry.