MoEInboxHelper

Helper class for Inbox-core Related features.

Author

Umang Chamaria

Since

1.0.00

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun deleteMessage(context: Context, inboxMessage: InboxMessage)

Deletes the given message from inbox. This API deletes the message for the account configured as default.

fun deleteMessage(context: Context, inboxMessage: InboxMessage, appId: String)

Deletes the given message from inbox. This API deletes the message for the given account.

Link copied to clipboard
@WorkerThread
fun fetchAllMessages(context: Context): InboxData?

Gets all the messages saved in the inbox for the account configured as default.

@WorkerThread
fun fetchAllMessages(context: Context, appId: String): InboxData?

Gets all the messages saved in the inbox for the given account.

Link copied to clipboard
fun fetchAllMessagesAsync(context: Context, listener: OnMessagesAvailableListener)

Gets all the messages saved in the inbox in the listener. This API fetches the message for the account configured as default.

fun fetchAllMessagesAsync(context: Context, appId: String, listener: OnMessagesAvailableListener)

Gets all the messages saved in the inbox in the listener. This API fetches the message for the given account.

Link copied to clipboard
@WorkerThread
@Nullable
fun fetchMessagesByTag(context: Context, messageTag: String): InboxData?

Gets all the messages filtered by message tag in the inbox for the instance configured as default.

@WorkerThread
@Nullable
fun fetchMessagesByTag(context: Context, messageTag: String, appId: String): InboxData?

Gets all the messages filtered by message tag in the inbox for the given instance.

Link copied to clipboard
fun fetchMessagesByTagAsync(context: Context, messageTag: String, listener: OnMessagesAvailableListener)
fun fetchMessagesByTagAsync(context: Context, messageTag: String, appId: String, listener: OnMessagesAvailableListener)

Return all the messages filtered by message tag in the inbox to the listener. This API fetches messages for the account configured as default.

Link copied to clipboard
fun getCouponCode(inboxMessage: InboxMessage): String

Get the coupon code associated to the campaign, if any.

Link copied to clipboard
@WorkerThread
@Nullable
fun getUnClickedMessagesCount(context: Context): UnClickedCountData?

Returns the count of un-clicked messages in the inbox for the account configured as default.

@WorkerThread
@Nullable
fun getUnClickedMessagesCount(context: Context, appId: String): UnClickedCountData?

Returns the count of un-clicked messages in the inbox for the given instance.

Link copied to clipboard

Returns the count of un-clicked messages in the inbox to the listener. This API fetches the count for the account configured as default.

fun getUnClickedMessagesCountAsync(context: Context, appId: String, listener: UnClickedCountListener)

Returns the count of un-clicked messages in the inbox to the listener. This API fetches the count for the given account.

Link copied to clipboard
fun hasCouponCode(inboxMessage: InboxMessage): Boolean

Checks whether the message has a coupon code associated to it.

Link copied to clipboard
fun trackMessageClicked(context: Context, inboxMessage: InboxMessage)

Marks the given message as clicked and tracks a click event for the same. This API updates the message for the account configured as default.

fun trackMessageClicked(context: Context, inboxMessage: InboxMessage, appId: String)

Marks the given message as clicked and tracks a click event for the same. This API updates the message for the given account.