MoEInboxHelper

class MoEInboxHelper

Helper class for Inbox-core Related features.

Author

Umang Chamaria

Since

1.0.00

Types

Companion
Link copied to clipboard
object Companion

Functions

deleteMessage
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.

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

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

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

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

fetchAllMessagesAsync
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.

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

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

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

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

fetchMessagesByTagAsync
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.

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

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

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

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

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

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

getUnClickedMessagesCountAsync
Link copied to clipboard
fun getUnClickedMessagesCountAsync(context: Context, listener: UnClickedCountListener)

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.

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

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

trackMessageClicked
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.