Package io.smooch.core
Class ConversationDelegateAdapter
- java.lang.Object
-
- io.smooch.core.ConversationDelegateAdapter
-
- All Implemented Interfaces:
ConversationDelegate
public abstract class ConversationDelegateAdapter extends java.lang.Object implements ConversationDelegate
Abstract class that implementsConversationDelegateso individual methods can be overridden.
-
-
Field Summary
-
Fields inherited from interface io.smooch.core.ConversationDelegate
INTEGRATOR_DELEGATE
-
-
Constructor Summary
Constructors Constructor Description ConversationDelegateAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonCardSummaryLoaded(CardSummary cardSummary)Notifies the delegate when a saved stripe card is loaded.voidonConversationEventReceived(ConversationEvent conversationActivity)Notifies the delegate of a new activity.voidonConversationsListUpdated(java.util.List<Conversation> conversationsList)Notifies the delegate when the conversations list was updated.voidonInitializationStatusChanged(InitializationStatus status)Notifies the delegate of a change in Initialization status.voidonLoginComplete(LoginResult result)Notifies the delegate when a call toSmooch.login(String, String, SmoochCallback)is completevoidonLogoutComplete(LogoutResult result)Notifies the delegate when a call toSmooch.logout(SmoochCallback)is completevoidonMessageSent(Message message, MessageUploadStatus status)Notifies the delegate of a message being sent.voidonMessagesReceived(Conversation conversation, java.util.List<Message> messages)Notifies the delegate of new incoming messages.voidonMessagesReset(Conversation conversation, java.util.List<Message> messages)Notifies the delegate the messages in a conversation have been reset.voidonPaymentProcessed(MessageAction messageAction, PaymentStatus status)Notifies the delegate when payment is processed.voidonSmoochConnectionStatusChanged(SmoochConnectionStatus status)Notifies the delegate when the user's connection to Smooch has changed.voidonSmoochHidden()Notifies the delegate when the Smooch Conversation is hidden.voidonSmoochShown()Notifies the delegate when the Smooch Conversation is shown.voidonUnreadCountChanged(Conversation conversation, int unreadCount)Notifies the delegate of a change in unread message count.booleanshouldTriggerAction(MessageAction messageAction)Allows a delegate to override default action behavior.
-
-
-
Method Detail
-
onMessagesReceived
public void onMessagesReceived(Conversation conversation, java.util.List<Message> messages)
Description copied from interface:ConversationDelegateNotifies the delegate of new incoming messages.Called when new messages are received from the server.
- Specified by:
onMessagesReceivedin interfaceConversationDelegate- Parameters:
conversation- The conversation object.messages- A list of Message objects representing the new messages.- See Also:
ConversationDelegate.onMessagesReceived(Conversation, List)
-
onMessagesReset
public void onMessagesReset(Conversation conversation, java.util.List<Message> messages)
Description copied from interface:ConversationDelegateNotifies the delegate the messages in a conversation have been reset.Called when new messages are received from the server that do not match locally stored cache or if a different conversation was loaded.
- Specified by:
onMessagesResetin interfaceConversationDelegate- Parameters:
conversation- The conversation object.messages- A list of Message objects representing the new messages.- See Also:
ConversationDelegate.onMessagesReset(Conversation, List)
-
onUnreadCountChanged
public void onUnreadCountChanged(Conversation conversation, int unreadCount)
Description copied from interface:ConversationDelegateNotifies the delegate of a change in unread message count.Called when conversation data is fetched from the server, or when the user enters the conversation activity.
- Specified by:
onUnreadCountChangedin interfaceConversationDelegate- Parameters:
conversation- The conversation objectunreadCount- The count of unread messages- See Also:
ConversationDelegate.onUnreadCountChanged(Conversation, int)
-
onMessageSent
public void onMessageSent(Message message, MessageUploadStatus status)
Description copied from interface:ConversationDelegateNotifies the delegate of a message being sent.Called once the message has been sent successfully or not.
- Specified by:
onMessageSentin interfaceConversationDelegate- Parameters:
message- The message that was sentstatus- The status of the message that was sent- See Also:
ConversationDelegate.onMessageSent(Message, MessageUploadStatus)
-
onConversationEventReceived
public void onConversationEventReceived(ConversationEvent conversationActivity)
Description copied from interface:ConversationDelegateNotifies the delegate of a new activity.Called when a new activity is received from the server
- Specified by:
onConversationEventReceivedin interfaceConversationDelegate- Parameters:
conversationActivity- The conversationActivity that was received- See Also:
ConversationDelegate.onConversationEventReceived(ConversationEvent)
-
onInitializationStatusChanged
public void onInitializationStatusChanged(InitializationStatus status)
Description copied from interface:ConversationDelegateNotifies the delegate of a change in Initialization status.- Specified by:
onInitializationStatusChangedin interfaceConversationDelegate- Parameters:
status- The new status- See Also:
ConversationDelegate.onInitializationStatusChanged(InitializationStatus)
-
onLoginComplete
public void onLoginComplete(LoginResult result)
Description copied from interface:ConversationDelegateNotifies the delegate when a call toSmooch.login(String, String, SmoochCallback)is complete- Specified by:
onLoginCompletein interfaceConversationDelegate- Parameters:
result- The login result- See Also:
ConversationDelegate.onLoginComplete(LoginResult)
-
onLogoutComplete
public void onLogoutComplete(LogoutResult result)
Description copied from interface:ConversationDelegateNotifies the delegate when a call toSmooch.logout(SmoochCallback)is complete- Specified by:
onLogoutCompletein interfaceConversationDelegate- Parameters:
result- The logout result- See Also:
ConversationDelegate.onLogoutComplete(LogoutResult)
-
onPaymentProcessed
public void onPaymentProcessed(MessageAction messageAction, PaymentStatus status)
Description copied from interface:ConversationDelegateNotifies the delegate when payment is processed.- Specified by:
onPaymentProcessedin interfaceConversationDelegate- Parameters:
messageAction- The purchased message actionstatus- The status of the payment- See Also:
ConversationDelegate.onPaymentProcessed(MessageAction, PaymentStatus)
-
shouldTriggerAction
public boolean shouldTriggerAction(MessageAction messageAction)
Description copied from interface:ConversationDelegateAllows a delegate to override default action behavior.Called when the user taps a message action.
- Specified by:
shouldTriggerActionin interfaceConversationDelegate- Parameters:
messageAction- The message action that was tapped.- Returns:
- false to prevent default behaviour of message action click, true otherwise
- See Also:
ConversationDelegate.shouldTriggerAction(MessageAction)
-
onCardSummaryLoaded
public void onCardSummaryLoaded(CardSummary cardSummary)
Description copied from interface:ConversationDelegateNotifies the delegate when a saved stripe card is loaded.Called when the stripe card info is loaded.
- Specified by:
onCardSummaryLoadedin interfaceConversationDelegate- Parameters:
cardSummary- The stripe card information.- See Also:
ConversationDelegate.onCardSummaryLoaded(CardSummary)
-
onSmoochConnectionStatusChanged
public void onSmoochConnectionStatusChanged(SmoochConnectionStatus status)
Description copied from interface:ConversationDelegateNotifies the delegate when the user's connection to Smooch has changed.Called when the user's connection to Smooch changes.
- Specified by:
onSmoochConnectionStatusChangedin interfaceConversationDelegate- Parameters:
status- The connection status.- See Also:
ConversationDelegate.onSmoochConnectionStatusChanged(SmoochConnectionStatus)
-
onSmoochShown
public void onSmoochShown()
Description copied from interface:ConversationDelegateNotifies the delegate when the Smooch Conversation is shown.- Specified by:
onSmoochShownin interfaceConversationDelegate- See Also:
ConversationDelegate.onSmoochShown()
-
onSmoochHidden
public void onSmoochHidden()
Description copied from interface:ConversationDelegateNotifies the delegate when the Smooch Conversation is hidden.- Specified by:
onSmoochHiddenin interfaceConversationDelegate- See Also:
ConversationDelegate.onSmoochHidden()
-
onConversationsListUpdated
public void onConversationsListUpdated(java.util.List<Conversation> conversationsList)
Description copied from interface:ConversationDelegateNotifies the delegate when the conversations list was updated. If you are building your own conversation list UI, implement this method to receive updates on any conversations in the list for this user- Specified by:
onConversationsListUpdatedin interfaceConversationDelegate- Parameters:
conversationsList- an updated list ofConversation- See Also:
ConversationDelegate.onConversationsListUpdated(List)
-
-