Inbox

open class Inbox

The inbox provides access to the device's local inbox data. Modifications (e.g., deletions or mark read) will be sent to the Airship server the next time the inbox is synchronized.

Types

Link copied to clipboard
A callback used to be notified when refreshing messages.

Properties

Link copied to clipboard
val user: User

Functions

Link copied to clipboard
open fun addListener(listener: InboxListener)
Subscribe a listener for inbox update event callbacks.
Link copied to clipboard
open fun deleteMessages(messageIds: Set<String>)
Mark Messages deleted.
Link copied to clipboard
open fun fetchMessages()
open fun fetchMessages(callback: Inbox.FetchMessagesCallback): Cancelable
open fun fetchMessages(looper: Looper, callback: Inbox.FetchMessagesCallback): Cancelable
Fetches the latest inbox changes from Airship.
Link copied to clipboard
open fun getCount(): Int
Gets the total message count.
Link copied to clipboard
open fun getMessage(messageId: String): Message
Get the Message with the corresponding message ID.
Link copied to clipboard
open fun getMessageByUrl(messageUrl: String): Message
Get the Message with the corresponding message body URL.
Link copied to clipboard
open fun getMessageIds(): Set<String>
Gets all the message ids in the inbox.
Link copied to clipboard
open fun getMessages(): List<Message>
Gets a list of RichPushMessages.
open fun getMessages(predicate: Predicate<Message>): List<Message>
Gets a list of RichPushMessages, filtered by the provided predicate.
Link copied to clipboard
open fun getReadCount(): Int
Gets the total read message count.
Link copied to clipboard
Gets a list of read RichPushMessages.
open fun getReadMessages(predicate: Predicate<Message>): List<Message>
Gets a list of read RichPushMessages, filtered by the provided predicate.
Link copied to clipboard
open fun getUnreadCount(): Int
Gets the total unread message count.
Link copied to clipboard
Gets a list of unread RichPushMessages.
open fun getUnreadMessages(predicate: Predicate<Message>): List<Message>
Gets a list of unread RichPushMessages, filtered by the provided predicate.
Link copied to clipboard
open fun markMessagesRead(messageIds: Set<String>)
Mark Messages read in bulk.
Link copied to clipboard
open fun markMessagesUnread(messageIds: Set<String>)
Mark Messages unread in bulk.
Link copied to clipboard
open fun removeListener(listener: InboxListener)
Unsubscribe a listener for inbox update event callbacks.