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

Check for permission without actually ask for it using Dexter #189

Open
romshiri opened this issue Oct 24, 2017 · 2 comments
Open

Check for permission without actually ask for it using Dexter #189

romshiri opened this issue Oct 24, 2017 · 2 comments

Comments

@romshiri
Copy link

Hi guys,

Is there any way to check for permissions without actually showing a dialog using the library?
I know I can do that with the framework library but as the code in Dexter is much cleaner so I prefer to use that.

I couldn't find in the documentation something that points to that.

Thanks.

@Serchinastico
Copy link
Contributor

Hi @romshiri

The dialog is not part of Dexter but the Android system, there is no way you can get rid of it, even if you don't use Dexter. However, if you are talking about the rationale dialog, that's an optional implementation we provide but you can always use the BasePermissionListener implementation.

@erawhctim
Copy link

@romshiri I was wondering the same thing. From what I can tell, Dexter doesn't have a method to do this, I would guess because the actual platform API call call is simple enough that there's no need to make a dexter wrapper around it. I'd just stick with that:

val calendarPermissionGranted = ContextCompat.checkSelfPermission(thisActivity, Manifest.permission.WRITE_CALENDAR) == PackageManager.PERMISSION_GRANTED

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants