Package-level declarations

Push notification handling and customization. PushMessage carries all data about a received notification. Extend NotificationServiceExtension to intercept notifications before display, suppress them in foreground, or override launch behavior. Use NotificationFactory to build fully custom notification layouts.

Action buttons

The server can attach up to three action buttons to a push through the pw_buttons field. Each button has an id, a label and an action:

actionWhat a tap does
openBrings the app forward exactly like a tap on the notification body
url / deeplinkOpens the button's url the way the push link does: an allowed external host goes to the system, a link your app resolves is delivered inside the app, otherwise the app is launched
customDelivers the tap to your code in the background without opening any screen

The SDK renders the buttons itself — a custom NotificationFactory must not render PushMessage.buttons again — and it owns the tap: the notification is dismissed, an open event carrying the button id is reported, and NotificationServiceExtension.onMessageOpened is called with a message whose PushMessage.tappedButtonId returns the tapped button's id. There is no separate callback. Rich Media, the push link l and the launch key apply to a tap on the notification body only.

A custom tap runs in a broadcast receiver: there is no activity, the budget is about ten seconds, and Android 12+ forbids starting an activity from there.

The legacy Android-only pw_actions contract (Action, PushMessage.getActions()) is deprecated. A push that carries pw_buttons never renders pw_actions.

Types

Link copied to clipboard
open class ActionButton
A notification action button defined by the server in the pw_buttons payload field.
Link copied to clipboard
Represents a local notification that can be scheduled to be shown at a specific time in the future.
Link copied to clipboard
Represents a handle to a scheduled local notification that allows you to manage and cancel it.
Link copied to clipboard
abstract class NotificationFactory
Base class for customizing push notification appearance and behavior.
Link copied to clipboard
Allows customization of push notification behavior before display and when opened.
Link copied to clipboard
open class PushMessage
Represents a push notification message received from Pushwoosh.
Link copied to clipboard
Default implementation of NotificationFactory provided by the Pushwoosh SDK.
Link copied to clipboard
Provides global configuration for push notification appearance and behavior.
Link copied to clipboard
Default implementation of SummaryNotificationFactory provided by the Pushwoosh SDK.
Link copied to clipboard
Defines sound playback behavior for push notifications.
Link copied to clipboard
Base class for customizing grouped notification summary appearance on Android 7.0 (Nougat) and higher.
Link copied to clipboard
Defines vibration behavior for push notifications.