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.

fetchAllMessages
Link copied to clipboard
fun fetchAllMessages(context: Context): List<InboxMessage>

Gets all the messages saved in the inbox.

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

Gets all the messages saved in the inbox. This is an asynchronous API and messages are provided via a callback.

fetchMessagesByTag
Link copied to clipboard
fun fetchMessagesByTag(context: Context, msgTag: String): List<InboxMessage>

Gets all the messages filtered by message tag in the inbox.

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

Gets all the messages filtered by message tag in the inbox. This is an asynchronous API and messages are provided via a callback.

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): Long

Returns the count of un-clicked messages in the inbox.

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

Returns the count of un-clicked messages in the inbox. This is an asynchronous API and count is provided via a callback.

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.