PushManager
This class is the primary interface for customizing the display and behavior of incoming push notifications.
Properties
Link copied to clipboard
The notification ID extra contains the ID of the notification placed in the
NotificationManager
by the library.Link copied to clipboard
The notification tag extra contains the tag of the notification placed in the
NotificationManager
by the library.Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
open fun addNotificationActionButtonGroup(@NonNull id: String, @NonNull group: NotificationActionButtonGroup)
Register a notification action group under the given name.
Link copied to clipboard
Adds notification action button groups from an xml file.
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
open fun enableUserNotifications(promptFallback: PermissionPromptFallback, consumer: Consumer<Boolean>)
Enables user notifications on Airship and tries to prompt for the notification permission.
Link copied to clipboard
Gets the foreground notification display predicate.
Link copied to clipboard
Returns the send metadata of the last received push.
Link copied to clipboard
Returns the notification action group that is registered under the given name.
Link copied to clipboard
Returns the current Airship push notification status.
Link copied to clipboard
Gets the PushProviderType corresponding to the current push provider.
Link copied to clipboard
Gets the push token.
Link copied to clipboard
Returns the Quiet Time interval currently set by the user.
Link copied to clipboard
Determines whether user-facing push notifications are enabled.
Link copied to clipboard
Determines whether we are currently in the middle of "Quiet Time".
Link copied to clipboard
Determines whether the app is capable of receiving push, meaning whether a FCM or ADM push token is present.
Link copied to clipboard
Determines whether "Quiet Time" is enabled.
Link copied to clipboard
Determines whether sound is enabled.
Link copied to clipboard
Determines whether vibration is enabled.
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
open fun setForegroundNotificationDisplayPredicate(@Nullable foregroundDisplayPredicate: Predicate<PushMessage>)
Sets a predicate that determines if a notification should be presented in the foreground or not.
Link copied to clipboard
Enables or disables quiet time.
Link copied to clipboard
Sets the Quiet Time interval.
Link copied to clipboard
Enables or disables sound.
Link copied to clipboard
Enables or disables user notifications.
Link copied to clipboard
Enables or disables vibration.
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.