nabinbhandari / Android-Permissions

Library for easy handling of android run-time permissions.
410 stars 84 forks source link

Unable to see the custom rationale dialog on app start or at least it's random #9

Closed wahibhaq closed 6 years ago

wahibhaq commented 6 years ago

Hi.

I moved back to my side project and even updated to version 3.7 but I don't think it is about the version. I have Android 7.0 and using it like this in my Activity.

Permissions.check(this,
            arrayOf(Manifest.permission.ACCESS_FINE_LOCATION),
            R.string.permission_required_body,
            Permissions.Options()
                    .setSettingsDialogTitle(getString(R.string.permission_required_title))
                    .setSettingsDialogMessage(getString(R.string.permission_blocked_body))
                    .setRationaleDialogTitle(getString(R.string.permission_required_title)),
            permissionHandler)

and instead of seeing the custom dialog, I see the native permission dialog to allow/deny permission but without the "Don't ask again" option. It happens irrespective of GPS is already enabled or disabled.

Can you please look into this matter because I am writing my blog post on a use case which uses your lib and now I am worried about this strange behaviour which was not there when I last worked on it 2 months ago.

nabinbhandari commented 6 years ago

The native permission dialog cannot be modified and these options are not for modifying the native dialog.

The manual permission options are for the second and third cases.

LunevNF commented 4 years ago

It's wrong! Google Play says, that we must to show dialog with the reason of using permissions before permissions allow/disallow system dialog!