public interface ConversationDelegate
Creating a delegate is optional, and may be used to receive callbacks when important changes happen in the conversation.
Callbacks are guaranteed to be called from the main thread.
| Modifier and Type | Field and Description |
|---|---|
static int |
INTEGRATOR_DELEGATE |
| Modifier and Type | Method and Description |
|---|---|
void |
onBrandMessengerConnectionStatusChanged(BrandMessengerConnectionStatus status)
Notifies the delegate when the user's connection to BrandMessenger has changed.
|
void |
onBrandMessengerHidden()
Notifies the delegate when the BrandMessenger Conversation is hidden.
|
void |
onBrandMessengerShown()
Notifies the delegate when the BrandMessenger Conversation is shown.
|
void |
onCardSummaryLoaded(CardSummary cardSummary)
Notifies the delegate when a saved stripe card is loaded.
|
void |
onConversationEventReceived(ConversationEvent conversationActivity)
Notifies the delegate of a new activity.
|
void |
onConversationsListUpdated(java.util.List<Conversation> conversationsList)
Notifies the delegate when the conversations list was updated.
|
void |
onInitializationStatusChanged(InitializationStatus status)
Notifies the delegate of a change in Initialization status.
|
void |
onLoginComplete(LoginResult result)
Notifies the delegate when a call to
BrandMessenger.login(String, String, BrandMessengerCallback) is complete |
void |
onLogoutComplete(LogoutResult result)
Notifies the delegate when a call to
BrandMessenger.logout(BrandMessengerCallback) is complete |
void |
onMessageSent(Message message,
MessageUploadStatus status)
Notifies the delegate of a message being sent.
|
void |
onMessagesReceived(Conversation conversation,
java.util.List<Message> messages)
Notifies the delegate of new incoming messages.
|
void |
onMessagesReset(Conversation conversation,
java.util.List<Message> messages)
Notifies the delegate the messages in a conversation have been reset.
|
void |
onPaymentProcessed(MessageAction messageAction,
PaymentStatus status)
Notifies the delegate when payment is processed.
|
void |
onUnreadCountChanged(Conversation conversation,
int unreadCount)
Notifies the delegate of a change in unread message count.
|
boolean |
shouldTriggerAction(MessageAction messageAction)
Allows a delegate to override default action behavior.
|
static final int INTEGRATOR_DELEGATE
void onMessagesReceived(Conversation conversation, java.util.List<Message> messages)
Called when new messages are received from the server.
conversation - The conversation object.messages - A list of Message objects representing the new messages.void onMessagesReset(Conversation conversation, java.util.List<Message> messages)
Called when new messages are received from the server that do not match locally stored cache or if a different conversation was loaded.
conversation - The conversation object.messages - A list of Message objects representing the new messages.void onUnreadCountChanged(Conversation conversation, int unreadCount)
Called when conversation data is fetched from the server, or when the user enters the conversation activity.
conversation - The conversation objectunreadCount - The count of unread messagesvoid onMessageSent(Message message, MessageUploadStatus status)
Called once the message has been sent successfully or not.
message - The message that was sentstatus - The status of the message that was sentMessageUploadStatusvoid onConversationEventReceived(ConversationEvent conversationActivity)
Called when a new activity is received from the server
conversationActivity - The conversationActivity that was receivedConversationEventTypevoid onInitializationStatusChanged(InitializationStatus status)
status - The new statusInitializationStatusvoid onLoginComplete(LoginResult result)
BrandMessenger.login(String, String, BrandMessengerCallback) is completeresult - The login resultLoginResultvoid onLogoutComplete(LogoutResult result)
BrandMessenger.logout(BrandMessengerCallback) is completeresult - The logout resultLogoutResultvoid onPaymentProcessed(MessageAction messageAction, PaymentStatus status)
messageAction - The purchased message actionstatus - The status of the paymentMessageAction,
PaymentStatusboolean shouldTriggerAction(MessageAction messageAction)
Called when the user taps a message action.
messageAction - The message action that was tapped.MessageActionvoid onCardSummaryLoaded(CardSummary cardSummary)
Called when the stripe card info is loaded.
cardSummary - The stripe card information.CardSummaryvoid onBrandMessengerConnectionStatusChanged(BrandMessengerConnectionStatus status)
Called when the user's connection to BrandMessenger changes.
status - The connection status.BrandMessengerConnectionStatusvoid onBrandMessengerShown()
void onBrandMessengerHidden()
void onConversationsListUpdated(java.util.List<Conversation> conversationsList)
conversationsList - an updated list of Conversation