showPermissionExplainedDialog

fun showPermissionExplainedDialog(activity: Activity, permissionName: String, permissionExplanation: String = getExplanationMessageForPermission(activity, permissionName))

Shows an alert dialog that explains the purpose of the declined permission with a button to accept the permission, and a button to quit the application if the permission is required (otherwise a button to continue)

Parameters

activity

: the activity used for the permissions request

permissionName

: the name of the permission from Manifest.permission

permissionExplanation

: the text that explains why this permission is requested by the application (optional)