java.lang.Object | |
↳ | com.urbanairship.permission.PermissionsManager |
Airship permission manager.
Airship will provide the default handling for notifications. Other Permission
needs to
be handled by the application by setting a delegate with PermissionDelegate
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addOnPermissionStatusChangedListener(OnPermissionStatusChangedListener listener)
Adds a permission status changed listener.
| ||||||||||
void |
checkPermissionStatus(Permission permission, Consumer<PermissionStatus> callback)
Checks the current permission status.
| ||||||||||
PendingResult<PermissionStatus> |
checkPermissionStatus(Permission permission)
Checks the current permission status.
| ||||||||||
Set<Permission> |
getConfiguredPermissions()
Gets the set of permissions that have a delegate.
| ||||||||||
void |
removeOnPermissionStatusChangedListener(OnPermissionStatusChangedListener listener)
Removes a permission status changed listener.
| ||||||||||
void |
requestPermission(Permission permission, boolean enableAirshipUsageOnGrant, Consumer<PermissionRequestResult> callback)
Requests a permission.
| ||||||||||
PendingResult<PermissionRequestResult> |
requestPermission(Permission permission)
Requests a permission.
| ||||||||||
void |
requestPermission(Permission permission, Consumer<PermissionRequestResult> callback)
Requests a permission.
| ||||||||||
PendingResult<PermissionRequestResult> |
requestPermission(Permission permission, boolean enableAirshipUsageOnGrant)
Requests a permission.
| ||||||||||
void |
setPermissionDelegate(Permission permission, PermissionDelegate delegate)
Sets a delegate to handle permissions.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Adds a permission status changed listener.
listener | The listener to remove. |
---|
Checks the current permission status.
permission | The permission. |
---|---|
callback | The callback with the result. |
Checks the current permission status.
permission | The permission. |
---|
Gets the set of permissions that have a delegate.
Removes a permission status changed listener.
listener | The listener to remove. |
---|
Requests a permission.
permission | The permission. |
---|---|
enableAirshipUsageOnGrant | If granted, any Airship features that need the permission will
be enabled, e.g., enabling FEATURE_PUSH and
setUserNotificationsEnabled(boolean) if the push permission
is granted. |
callback | The callback. |
Requests a permission. If a delegate is not set to handle the permission NOT_DETERMINED
will
be returned.
permission | The permission. |
---|
Requests a permission.
permission | The permission. |
---|---|
callback | The callback. |
Requests a permission. If a delegate is not set to handle the permission NOT_DETERMINED
will
be returned.
permission | The permission. |
---|---|
enableAirshipUsageOnGrant | If granted, any Airship features that need the permission will
be enabled, e.g., enabling FEATURE_PUSH and
setUserNotificationsEnabled(boolean) if the push permission
is granted. |
Sets a delegate to handle permissions.
permission | The permission. |
---|---|
delegate | The delegate. |