public interface

NotificationProvider

com.urbanairship.push.notifications.NotificationProvider
Known Indirect Subclasses

Class Overview

Used to provide notifications for Airship push messages. The notification provider should never post the notification to the notification manager. The Urban Airship SDK will do that on behave of the application.

Summary

Constants
String DEFAULT_NOTIFICATION_CHANNEL Default notification channel ID.
Public Methods
abstract NotificationResult onCreateNotification(Context context, NotificationArguments arguments)
Called to generate the NotificationResult for a push message.
abstract NotificationArguments onCreateNotificationArguments(Context context, PushMessage message)
Called to generate the NotificationArguments for a push message.
abstract void onNotificationCreated(Context context, Notification notification, NotificationArguments arguments)
Called before posting the notification.

Constants

public static final String DEFAULT_NOTIFICATION_CHANNEL

Default notification channel ID.

Constant Value: "com.urbanairship.default"

Public Methods

public abstract NotificationResult onCreateNotification (Context context, NotificationArguments arguments)

Called to generate the NotificationResult for a push message.

Parameters
context The context.
arguments The arguments from onCreateNotificationArguments(Context, PushMessage).
Returns
  • The notification result.

public abstract NotificationArguments onCreateNotificationArguments (Context context, PushMessage message)

Called to generate the NotificationArguments for a push message.

Parameters
context The context.
message The message.
Returns
  • The notification arguments.

public abstract void onNotificationCreated (Context context, Notification notification, NotificationArguments arguments)

Called before posting the notification. The notification will have settings applied from an associated NotificationChannelCompat on pre-O devices Use this method to apply any global overrides to the notification.

Parameters
context The context.
notification The notification.
arguments The notification arguments.