WIMM Labs


com.wimm.framework.app
Class Notification

java.lang.Object
  extended by com.wimm.framework.app.Notification
All Implemented Interfaces:
Parcelable, Comparable<Notification>

public class Notification
extends Object
implements Parcelable, Comparable<Notification>

Represents a notification that is presented using the NotificationAgent.

Each notification consists of a title, body text, and an optional button for acting on the notification. When a notification is displayed the device may sound an audible alert and/or vibrate, depending on the user's settings.

If a single notification is active it will be displayed full-screen. If multiple notifications are active they will appear in a list with just the title and body visible. The user can tap the notification in the list to expand it to full-screen.

Notifications are modal and must be dismissed before the underlying activity can resume. If the optional button is present, clicking it will trigger the buttonIntent and dismiss the notification.

Refer to WIMM Developer's Guide on Notification HOWTO guide for more information about developing Notifications enabled MicroApp.

Since:
WIMM SDK 1.0.0
See Also:
NotificationAgent

Nested Class Summary
 
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.Creator<T>
 
Field Summary
 CharSequence body
          Additional detail about the notification.
 PendingIntent buttonIntent
          The PendingIntent dispatched when the notification's button is tapped.
 CharSequence buttonTitle
          Text displayed on the notification button.
 boolean centerText
          Flag controlling whether content is centered or left aligned.
 PendingIntent closeIntent
          The Intent dispatched when the notification is dismissed.
 CharSequence title
          Brief text identifying the subject of the notification.
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Constructor Summary
Notification(CharSequence title, CharSequence body, boolean centerText)
          Notification constructor requiring only a title and a body.
Notification(CharSequence title, CharSequence body, PendingIntent closeIntent, boolean centerText)
          Notification constructor.
Notification(CharSequence title, CharSequence body, PendingIntent closeIntent, CharSequence button, PendingIntent buttonIntent, boolean centerText)
          Notification constructor.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface android.os.Parcelable
describeContents, writeToParcel
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

title

public CharSequence title
Brief text identifying the subject of the notification.

Since:
WIMM SDK 1.0.0

body

public CharSequence body
Additional detail about the notification. When multiple notifications appear at the same time, the body text may be truncated.

Since:
WIMM SDK 1.0.0

closeIntent

public PendingIntent closeIntent
The Intent dispatched when the notification is dismissed.

Since:
WIMM SDK 1.0.0

buttonTitle

public CharSequence buttonTitle
Text displayed on the notification button.

Since:
WIMM SDK 1.0.0

buttonIntent

public PendingIntent buttonIntent
The PendingIntent dispatched when the notification's button is tapped.

Since:
WIMM SDK 1.0.0

centerText

public boolean centerText
Flag controlling whether content is centered or left aligned.

Since:
WIMM SDK 1.0.0
Constructor Detail

Notification

public Notification(CharSequence title,
                    CharSequence body,
                    boolean centerText)
Notification constructor requiring only a title and a body.

Parameters:
title - Brief text identifying the subject of the notification.
body - Additional detail about the notification.
centerText - Flag controlling whether content is centered or left aligned.
Since:
WIMM SDK 1.0.0

Notification

public Notification(CharSequence title,
                    CharSequence body,
                    PendingIntent closeIntent,
                    boolean centerText)
Notification constructor.

Parameters:
title - Brief text identifying the subject of the notification.
body - Additional detail about the notification.
closeIntent - The PendingIntent to dispatch when the notification is dismissed.
centerText - Flag controlling whether content is centered or left aligned.
Since:
WIMM SDK 1.0.0

Notification

public Notification(CharSequence title,
                    CharSequence body,
                    PendingIntent closeIntent,
                    CharSequence button,
                    PendingIntent buttonIntent,
                    boolean centerText)
Notification constructor.

Parameters:
title - Brief text identifying the subject of the notification.
body - More detail about the notification.
closeIntent - The PendingIntent to dispatch when the notification is dismissed.
button - The text to display on the notification button.
buttonIntent - The PendingIntent to dispatch when the the notification's button is tapped.
centerText - Flag controlling whether content is centered or left aligned.
Since:
WIMM SDK 1.0.0

WIMM Labs