PushManager

This class is the primary interface for customizing the display and behavior of incoming push notifications.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Sets a predicate that determines if a notification should be presented in the foreground or not.

Link copied to clipboard

Whether the app is currently inside of "Quiet Time".

Link copied to clipboard

Whether the app is currently opted in for push.

Link copied to clipboard

Whether the app is capable of receiving push (true if a push token is present).

Link copied to clipboard
Link copied to clipboard

Controls whether "Quiet Time" is enabled.

Link copied to clipboard

Whether sound is enabled.

Link copied to clipboard

Whether vibration is enabled.

Link copied to clipboard

The send metadata of the last received push, or null if none exists.

Link copied to clipboard

Sets the notification provider used to build notifications from a push message

Link copied to clipboard
Link copied to clipboard

Gets the push token.

Link copied to clipboard

The Quiet Time interval set by the user.

Link copied to clipboard

Whether user-facing push notifications are enabled.

Inherited properties

Link copied to clipboard
protected val defaultExecutor: Executor

Default job executor.

Link copied to clipboard

Airship notification status state flow.

Functions

Link copied to clipboard

Register a notification action group under the given name.

Link copied to clipboard

Adds notification action button groups from an xml file. Example entry:

Link copied to clipboard

Adds an Airship push notification status listener.

Link copied to clipboard

Adds a push listener.

Link copied to clipboard

Adds a push token listener.

Link copied to clipboard

Checks if notifications are enabled for the app and in the push manager.

Link copied to clipboard

Enables user notifications on Airship and tries to prompt for the notification permission.

Link copied to clipboard

Returns the notification action group that is registered under the given name.

Link copied to clipboard
fun isUniqueCanonicalId(canonicalId: String?): Boolean

Check to see if we've seen this ID before. If we have, return false. If not, add the ID to our history and return true.

Link copied to clipboard
fun onTokenChanged(pushProviderClass: Class<out PushProvider?>?, token: String?)
Link copied to clipboard
fun performPushRegistration(updateChannelOnChange: Boolean): JobResult

Performs push registration.

Link copied to clipboard

Removes the notification button group under the given name.

Link copied to clipboard

Removes an Airship push notification status listener.

Link copied to clipboard

Removes a push listener.

Link copied to clipboard

Removes a push token listener.

Link copied to clipboard
fun setQuietTimeInterval(startTime: Date, endTime: Date)

Sets the Quiet Time interval.

Link copied to clipboard

Inherited functions

Link copied to clipboard
suspend fun PushManager.enableUserNotifications(promptFallback: PermissionPromptFallback = PermissionPromptFallback.None): Boolean

Enables user notifications on Airship and tries to prompt for the notification permission.