public class

SystemNotificationFactory

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

Class Overview

Notification factory that creates notifications with no default styles or fallback layouts.

Summary

Public Constructors
SystemNotificationFactory(Context context)
System notification constructor.
Public Methods
Notification createNotification(PushMessage message, int notificationId)
Creates a Notification for an incoming push message.
[Expand]
Inherited Methods
From class com.urbanairship.push.notifications.DefaultNotificationFactory
From class com.urbanairship.push.notifications.NotificationFactory
From class java.lang.Object

Public Constructors

public SystemNotificationFactory (Context context)

System notification constructor.

Parameters
context The application context.

Public Methods

public Notification createNotification (PushMessage message, int notificationId)

Creates a Notification for an incoming push message.

In order to handle notification opens, the application should register a broadcast receiver that extends BaseIntentReceiver. When the notification is opened it will call onNotificationOpened(Context, PushMessage, int) giving the application a chance to handle the notification open. If the broadcast receiver is not registered, or false is returned, an open will be handled by either starting the launcher activity or by sending the notification's content intent if it is present.

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