java.lang.Object | |
↳ | com.urbanairship.push.notifications.AirshipNotificationProvider |
Known Direct Subclasses |
Default notification provider.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | TAG_NOTIFICATION_ID | Default Notification ID when the PushMessage defines a notification tag. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.urbanairship.push.notifications.NotificationProvider
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AirshipNotificationProvider(Context context, AirshipConfigOptions configOptions) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int |
getDefaultAccentColor()
Get the default accent color.
| ||||||||||
String |
getDefaultNotificationChannelId()
Gets the default notification channel.
| ||||||||||
int |
getDefaultTitle()
Get the default notification title string resource.
| ||||||||||
int |
getLargeIcon()
Get the large icon drawable resource.
| ||||||||||
int |
getSmallIcon()
Get the small icon drawable resource.
| ||||||||||
NotificationResult |
onCreateNotification(Context context, NotificationArguments arguments)
Called to generate the
NotificationResult for a push message. | ||||||||||
NotificationArguments |
onCreateNotificationArguments(Context context, PushMessage message)
Called to generate the
NotificationArguments for a push message. | ||||||||||
void |
onNotificationCreated(Context context, Notification notification, NotificationArguments arguments)
Called before posting the notification.
| ||||||||||
void |
setDefaultAccentColor(int accentColor)
Set the default notification accent color.
| ||||||||||
void |
setDefaultNotificationChannelId(String channel)
Sets the default notification channel.
| ||||||||||
void |
setDefaultTitle(int titleId)
Set the default notification title.
| ||||||||||
void |
setLargeIcon(int largeIcon)
Set the notification large icon.
| ||||||||||
void |
setSmallIcon(int smallIconId)
Set the notification small icon.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int |
getNextId(Context context, PushMessage message)
Gets the next notification Id.
| ||||||||||
String |
getTitle(Context context, PushMessage message)
Gets the notification title.
| ||||||||||
NotificationCompat.Builder |
onExtendBuilder(Context context, NotificationCompat.Builder builder, NotificationArguments arguments)
Override this method to extend the notification builder.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.urbanairship.push.notifications.NotificationProvider
|
Default Notification ID when the PushMessage
defines a notification tag.
Get the default accent color.
Gets the default notification channel.
Get the default notification title string resource.
Get the large icon drawable resource.
Get the small icon drawable resource. Defaults to the application's icon.
Called to generate the NotificationResult
for a push message.
context | The context. |
---|---|
arguments | The arguments from onCreateNotificationArguments(Context, PushMessage) . |
Called to generate the NotificationArguments
for a push message.
context | The context. |
---|---|
message | The message. |
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.
context | The context. |
---|---|
notification | The notification. |
arguments | The notification arguments. |
Set the default notification accent color.
accentColor | The accent color. |
---|
Sets the default notification channel.
channel | The default notification channel. |
---|
Set the default notification title.
titleId | The title string resource. A value of 0 will result in no default title. |
---|
Set the notification large icon.
largeIcon | The large icon drawable resource. |
---|
Set the notification small icon.
smallIconId | The small icon drawable resource. |
---|
Gets the next notification Id.
context | The application context. |
---|---|
message | The push message. |
Gets the notification title.
context | The application context. |
---|---|
message | The push message. |
Override this method to extend the notification builder.
The default method behavior applies extends the builder with PublicNotificationExtender
,
WearableNotificationExtender
, ActionsNotificationExtender
, and
StyleNotificationExtender
.
context | The application context. |
---|---|
builder | The notification builder. |
arguments | The notification arguments. |