requestPermission

fun requestPermission(permission: Permission, enableAirshipUsageOnGrant: Boolean = false, fallback: PermissionPromptFallback = PermissionPromptFallback.None, callback: Consumer<PermissionRequestResult?>)

Requests a permission.

Parameters

permission

The permission.

enableAirshipUsageOnGrant

If granted, any Airship features that need the permission will be enabled, e.g., enabling com.urbanairship.PrivacyManager.Feature.PUSH and com.urbanairship.push.PushManager.setUserNotificationsEnabled if the push permission is granted.

callback

The callback.


fun requestPermission(permission: Permission, enableAirshipUsageOnGrant: Boolean = false, fallback: PermissionPromptFallback = PermissionPromptFallback.None): PendingResult<PermissionRequestResult?>

Requests a permission. If a delegate is not set to handle the permission PermissionStatus.NOT_DETERMINED will be returned.

Return

A pending result.

Parameters

permission

The permission.

enableAirshipUsageOnGrant

If granted, any Airship features that need the permission will be enabled, e.g., enabling com.urbanairship.PrivacyManager.Feature.PUSH and com.urbanairship.push.PushManager.setUserNotificationsEnabled if the push permission is granted.