constructPermissionsRequest

fun FragmentActivity.constructPermissionsRequest(vararg permissions: String, onShowRationale: ShowRationaleFun? = null, onPermissionDenied: Fun? = null, onNeverAskAgain: Fun? = null, requiresPermission: Fun): PermissionsRequester
fun Fragment.constructPermissionsRequest(vararg permissions: String, onShowRationale: ShowRationaleFun? = null, onPermissionDenied: Fun? = null, onNeverAskAgain: Fun? = null, requiresPermission: Fun): PermissionsRequester

Constructs a request for ordinary permissions that require a grant from the user. Be sure to invoke the method when an activity is created to capture the valid callbacks.

See also

Parameters

permissions

the permissions requiresPermission requires.

onShowRationale

the method explains why the permissions are required.

onPermissionDenied

the method invoked if the user doesn't grant the permissions.

onNeverAskAgain

the method invoked if the user does not deny the permissions with "never ask again" option.

requiresPermission

the action requires permissions.