MoECardHelper

class MoECardHelper

Author

Umang Chamaria

Types

Companion
Link copied to clipboard
object Companion

Functions

clearAppSessionCards
Link copied to clipboard
fun clearAppSessionCards()

Clear the cached card identifiers for the application session.

deleteCard
Link copied to clipboard
fun deleteCard(context: Context, card: Card)

Marks a card as deleted.

getAppSessionCards
Link copied to clipboard
fun getAppSessionCards(): Set<String>

Set of card identifiers shown in the current application session.

getCardAdapter
Link copied to clipboard
fun getCardAdapter(activity: Activity): CardAdapter

Gets the custom adapter used for inbox or instance of DefaultCardAdapter in case custom adapter is not set.

getCardCategories
Link copied to clipboard
fun getCardCategories(context: Context): LinkedList<String>

Returns a list of categories to be shown.

getCardForCategory
Link copied to clipboard
fun getCardForCategory(context: Context, category: String)

Returns a list of eligible cards for the given category to the callback CardListener.onCardAvailable To fetch all cards irrespective of categories pass in the category as MoECardHelper.CATEGORY_ALL

getCardListener
Link copied to clipboard
fun getCardListener(): CardListener
getNewCardCount
Link copied to clipboard
fun getNewCardCount(context: Context)

Returns the count of new cards to the callback CardListener.onNewCardCountAvailable

getUnClickedCardCount
Link copied to clipboard
fun getUnClickedCardCount(context: Context)

Returns the count of unread cards to the callback CardListener.onUnClickedCountAvailable

onCardShown
Link copied to clipboard
fun onCardShown(context: Context, card: Card)

Track cards shown and update delivery counters accordingly.

onInboxGoingToBackground
Link copied to clipboard
fun onInboxGoingToBackground(context: Context)

Notifies the SDK that the inbox view is gone to the background.

onNewCardsAvailable
Link copied to clipboard
fun onNewCardsAvailable(newCards: List<CardModel>)
registerListener
Link copied to clipboard
fun registerListener(cardListener: CardListener)

Registers a callback to be notified for card related events.

setCardAdapter
Link copied to clipboard
fun setCardAdapter(cardAdapter: CardAdapter)

Set a custom adapter for inbox customisation

trackCardClicked
Link copied to clipboard
fun trackCardClicked(context: Context, card: Card, widgetId: Int)

Marks a card as clicked and tracks an event for statistical purpose.

trackCardDelivered
Link copied to clipboard
fun trackCardDelivered(context: Context)

Tracking card delivery to inbox.

trackInboxOpen
Link copied to clipboard
fun trackInboxOpen(context: Context)

Tracks inbox open.