fetchMessages

Fetches the latest inbox changes from Airship.

Normally this method is not called directly as the message list is automatically fetched when the application foregrounds or when a notification with an associated message is received.

If the fetch request completes and results in a change to the messages, InboxListener.onInboxUpdated will be called.

Return

A cancelable object that can be used to cancel the callback.

Parameters

callback

Optional callback to be notified when the request finishes fetching the messages.


fun fetchMessages(looper: Looper? = null, callback: Inbox.FetchMessagesCallback? = null): Cancelable

Fetches the latest inbox changes from Airship.

Normally this method is not called directly as the message list is automatically fetched when the application foregrounds or when a notification with an associated message is received.

If the fetch request completes and results in a change to the messages, InboxListener.onInboxUpdated will be called.

Return

A cancelable object that can be used to cancel the callback.

Parameters

callback

Optional callback to be notified when the request finishes fetching the messages.

looper

Optional Looper to post the callback on.


suspend fun fetchMessages(): Boolean

Suspending function to fetch the latest inbox changes from Airship.

If the fetch request completes and results in a change to the messages, InboxListener.onInboxUpdated will be called.

Return

true if the fetch was successful, false otherwise.