public class

DefaultNotificationFactory

extends NotificationFactory
java.lang.Object
   ↳ com.urbanairship.push.notifications.NotificationFactory
     ↳ com.urbanairship.push.notifications.DefaultNotificationFactory

This class is deprecated.
Use AirshipNotificationProvider instead.

Class Overview

The default notification factory.

Notifications generated by this factory use the standard Android notification layout and defaults to the BigTextStyle.

To customize the factory, override extendBuilder(NotificationCompat.Builder, PushMessage, int).

Summary

[Expand]
Inherited Constants
From class com.urbanairship.push.notifications.NotificationFactory
Public Constructors
DefaultNotificationFactory(Context context)
Default constructor.
Public Methods
final Notification createNotification(PushMessage message, int notificationId)
Creates a Notification for an incoming push message.
NotificationCompat.Builder extendBuilder(NotificationCompat.Builder builder, PushMessage message, int notificationId)
Called to apply any final overrides to the builder before the notification is built.
static DefaultNotificationFactory newFactory(Context context, AirshipConfigOptions options)
Creates the default notification factory with settings applied from AirshipConfig options.
[Expand]
Inherited Methods
From class com.urbanairship.push.notifications.NotificationFactory
From class java.lang.Object

Public Constructors

public DefaultNotificationFactory (Context context)

Default constructor.

Parameters
context The application context

Public Methods

public final Notification createNotification (PushMessage message, int notificationId)

Creates a Notification for an incoming push message.

Parameters
message The push message.
notificationId The notification ID.
Returns
  • The notification to display, or null if no notification is desired.

public NotificationCompat.Builder extendBuilder (NotificationCompat.Builder builder, PushMessage message, int notificationId)

Called to apply any final overrides to the builder before the notification is built.

Parameters
builder The notification builder.
message The push message.
notificationId The notification ID.
Returns
  • The notification builder.

public static DefaultNotificationFactory newFactory (Context context, AirshipConfigOptions options)

Creates the default notification factory with settings applied from AirshipConfig options.

Parameters
context The application context.
options The airship config options.
Returns
  • The default notification factory.