public class

RichPushMessage

extends Object
implements Comparable<T>
java.lang.Object
   ↳ com.urbanairship.richpush.RichPushMessage

Class Overview

The primary data structure for Rich Push messages.

Summary

Public Methods
int compareTo(RichPushMessage another)
void delete()
Delete the message.
boolean equals(Object o)
Date getExpirationDate()
Get the message's expiration date in UTC.
Long getExpirationDateMS()
Get the message's expiration date (unix epoch time in milliseconds).
Bundle getExtras()
Get the message's extras.
String getListIconUrl()
Gets the list icon URL if available.
String getMessageBodyUrl()
Get the message body URL.
String getMessageId()
Get the message's Urban Airship ID.
String getMessageReadUrl()
Get the message mark-as-read URL.
String getMessageUrl()
Get the message URL.
JsonValue getRawMessageJson()
Gets the entire raw message payload as JSON.
Date getSentDate()
Get the message's sent date in UTC.
long getSentDateMS()
Get the message's sent date (unix epoch time in milliseconds).
String getTitle()
Get the message's title.
int hashCode()
boolean isDeleted()
Indicates whether the message has been deleted.
boolean isExpired()
Indicates whether the message has been expired.
boolean isRead()
Indicates whether the message has been read.
void markRead()
Mark the message as read.
void markUnread()
Mark the message as unread.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.lang.Comparable

Public Methods

public int compareTo (RichPushMessage another)

public void delete ()

Delete the message.

public boolean equals (Object o)

public Date getExpirationDate ()

Get the message's expiration date in UTC.

Returns
  • The message's sent expiration date or null if the message does not have an expiration date.

public Long getExpirationDateMS ()

Get the message's expiration date (unix epoch time in milliseconds).

Returns
  • The message's expiration date (unix epoch time in milliseconds), or null if the message does not have an expiration date.

public Bundle getExtras ()

Get the message's extras.

Returns
  • The message's extras in a Bundle.

public String getListIconUrl ()

Gets the list icon URL if available.

Returns
  • The list icon URL if available, otherwise null.

public String getMessageBodyUrl ()

Get the message body URL.

Returns
  • The message body URL.

public String getMessageId ()

Get the message's Urban Airship ID.

Returns
  • The message id.

public String getMessageReadUrl ()

Get the message mark-as-read URL.

Returns
  • The message mark-as-read URL.

public String getMessageUrl ()

Get the message URL.

Returns
  • The message URL.

public JsonValue getRawMessageJson ()

Gets the entire raw message payload as JSON.

Returns
  • The message's payload as JSON.

public Date getSentDate ()

Get the message's sent date in UTC.

Returns
  • The message's sent date.

public long getSentDateMS ()

Get the message's sent date (unix epoch time in milliseconds).

Returns
  • The message's sent date (unix epoch time in milliseconds).

public String getTitle ()

Get the message's title.

Returns
  • The message title.

public int hashCode ()

public boolean isDeleted ()

Indicates whether the message has been deleted.

Returns
  • true if the message is deleted, false otherwise.

public boolean isExpired ()

Indicates whether the message has been expired.

Returns
  • true if expired, otherwise false.

public boolean isRead ()

Indicates whether the message has been read.

Returns
  • true if the message is read, false otherwise.

public void markRead ()

Mark the message as read.

public void markUnread ()

Mark the message as unread.