java.lang.Object | ||
↳ | com.urbanairship.BaseManager | |
↳ | com.urbanairship.richpush.RichPushManager |
This class is the primary interface for Rich Push functionality.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | RichPushManager.Listener | A listener interface for receiving event callbacks related to inbox and user updates. | |||||||||
interface | RichPushManager.RefreshMessagesCallback | A callback used to be notified when refreshing messages. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | RICH_PUSH_KEY | The rich push extra that contains the rich push message ID. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addListener(RichPushManager.Listener listener)
Subscribe a listener for inbox and user update event callbacks.
| ||||||||||
synchronized RichPushInbox |
getRichPushInbox()
Get the
RichPushInbox . | ||||||||||
synchronized RichPushUser |
getRichPushUser()
Get the
RichPushUser . | ||||||||||
boolean |
isRefreshingMessages()
Indicates whether messages are currently being retrieved from the server.
| ||||||||||
static boolean |
isRichPushMessage(Map<String, String> extras)
Indicates whether a push belongs to a Rich Push message.
| ||||||||||
static boolean |
isRichPushMessage(Bundle extras)
Indicates whether a push belongs to a Rich Push message.
| ||||||||||
void |
refreshMessages()
Sync the messages on the device with what's on the server.
| ||||||||||
void |
refreshMessages(RichPushManager.RefreshMessagesCallback callback)
Sync the messages on the device with what's on the server.
| ||||||||||
void |
refreshMessages(boolean force)
Sync the messages on the device with what's on the server.
| ||||||||||
void |
removeListener(RichPushManager.Listener listener)
Unsubscribe a listener for inbox and user update event callbacks.
| ||||||||||
void |
updateUser()
This method is deprecated.
Marked to be removed in 7.0.0. Use updateUser(true) instead.
| ||||||||||
void |
updateUser(boolean forcefully)
Updates the user on the device with what's on the server.
| ||||||||||
void |
updateUserIfNecessary()
This method is deprecated.
Marked to be removed in 7.0.0. Use updateUser(false) instead.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
init()
Initialize the manager.
| ||||||||||
void |
tearDown()
Tear down the manager.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
The rich push extra that contains the rich push message ID.
Subscribe a listener for inbox and user update event callbacks.
listener | An object implementing the RichPushManager.Listener interface.
|
---|
Indicates whether messages are currently being retrieved from the server.
true
if a refresh is in progress, false
otherwise.
Indicates whether a push belongs to a Rich Push message.
This is used for incoming push messages.extras | Push message extras. |
---|
true
if the extras belong to a rich push message, false
otherwise.
Indicates whether a push belongs to a Rich Push message.
This is used for determining whether an opened notification is a rich push message.extras | Notification Intent extras. |
---|
true
if the extras belong to a rich push message, false
otherwise.
Sync the messages on the device with what's on the server.
The inbox should be updated automatically.Sync the messages on the device with what's on the server.
The inbox should be updated automatically. Note: The listeners will be called after all of the refresh message requests are finished, while the callback will be called after this particular refresh messages request is finished.callback | Callback to be notified when the request finishes refreshing the messages. |
---|
Sync the messages on the device with what's on the server.
The inbox should be updated automatically.force | true to refresh messages even if messages are
being refreshed.
|
---|
Unsubscribe a listener for inbox and user update event callbacks.
listener | An object implementing the RichPushManager.Listener interface.
|
---|
This method is deprecated.
Marked to be removed in 7.0.0. Use updateUser(true) instead.
Sync the user on the device with what's on the server.
Updates the user on the device with what's on the server.
forcefully | A boolean indicating if the rich push user needs to be updated. |
---|
This method is deprecated.
Marked to be removed in 7.0.0. Use updateUser(false) instead.
Updates the user if the user has not been updated in the last 24hrs.