public class ConversationActivity extends AppCompatActivity implements ConversationDelegate
INTEGRATOR_DELEGATE| Constructor and Description |
|---|
ConversationActivity() |
| Modifier and Type | Method and Description |
|---|---|
static ConversationActivityBuilder |
builder()
Returns a new builder for configuring and displaying
ConversationActivity. |
static void |
close()
Closes the conversation view.
|
void |
closeFormFragment() |
void |
onBackPressed() |
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 conversationEvent)
Notifies the delegate of a new activity.
|
void |
onConversationsListUpdated(java.util.List<Conversation> conversationsList)
Notifies the delegate when the conversations list was updated.
|
protected void |
onCreate(android.os.Bundle savedInstanceState) |
boolean |
onCreateOptionsMenu(android.view.Menu menu) |
protected void |
onDestroy() |
void |
onFormComplete() |
void |
onFormFragmentClose(Message message) |
void |
onFormFragmentShown() |
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.
|
boolean |
onOptionsItemSelected(android.view.MenuItem item) |
void |
onPause() |
void |
onPaymentProcessed(MessageAction messageAction,
PaymentStatus status)
Notifies the delegate when payment is processed.
|
void |
onPurchaseComplete() |
void |
onResume() |
void |
onShadedAreaClick() |
void |
onStart() |
void |
onStop() |
void |
onStripeFragmentClose() |
void |
onStripeFragmentShown() |
void |
onUnreadCountChanged(Conversation conversation,
int unreadCount)
Notifies the delegate of a change in unread message count.
|
void |
onWebviewHidden() |
void |
onWebviewShown() |
boolean |
shouldTriggerAction(MessageAction messageAction)
Allows a delegate to override default action behavior.
|
public static ConversationActivityBuilder builder()
ConversationActivity.ConversationActivityBuilderpublic static void close()
Ignored if the conversation is not running.
protected void onCreate(android.os.Bundle savedInstanceState)
protected void onDestroy()
public boolean onCreateOptionsMenu(android.view.Menu menu)
public boolean onOptionsItemSelected(android.view.MenuItem item)
public void onFormFragmentClose(Message message)
public void onBackPressed()
public void onResume()
public void onPause()
public void onStart()
public void onStop()
public void onMessagesReceived(Conversation conversation, java.util.List<Message> messages)
ConversationDelegateCalled when new messages are received from the server.
onMessagesReceived in interface ConversationDelegateconversation - The conversation object.messages - A list of Message objects representing the new messages.public void onMessagesReset(Conversation conversation, java.util.List<Message> messages)
ConversationDelegateCalled when new messages are received from the server that do not match locally stored cache or if a different conversation was loaded.
onMessagesReset in interface ConversationDelegateconversation - The conversation object.messages - A list of Message objects representing the new messages.public void onUnreadCountChanged(Conversation conversation, int unreadCount)
ConversationDelegateCalled when conversation data is fetched from the server, or when the user enters the conversation activity.
onUnreadCountChanged in interface ConversationDelegateconversation - The conversation objectunreadCount - The count of unread messagespublic void onMessageSent(Message message, MessageUploadStatus status)
ConversationDelegateCalled once the message has been sent successfully or not.
onMessageSent in interface ConversationDelegatemessage - The message that was sentstatus - The status of the message that was sentMessageUploadStatuspublic void onConversationEventReceived(ConversationEvent conversationEvent)
ConversationDelegateCalled when a new activity is received from the server
onConversationEventReceived in interface ConversationDelegateconversationEvent - The conversationActivity that was receivedConversationEventTypepublic void onInitializationStatusChanged(InitializationStatus status)
ConversationDelegateonInitializationStatusChanged in interface ConversationDelegatestatus - The new statusInitializationStatuspublic void onLoginComplete(LoginResult result)
ConversationDelegateBrandMessenger.login(String, String, BrandMessengerCallback) is completeonLoginComplete in interface ConversationDelegateresult - The login resultLoginResultpublic void onLogoutComplete(LogoutResult result)
ConversationDelegateBrandMessenger.logout(BrandMessengerCallback) is completeonLogoutComplete in interface ConversationDelegateresult - The logout resultLogoutResultpublic void onPaymentProcessed(MessageAction messageAction, PaymentStatus status)
ConversationDelegateonPaymentProcessed in interface ConversationDelegatemessageAction - The purchased message actionstatus - The status of the paymentMessageAction,
PaymentStatuspublic boolean shouldTriggerAction(MessageAction messageAction)
ConversationDelegateCalled when the user taps a message action.
shouldTriggerAction in interface ConversationDelegatemessageAction - The message action that was tapped.MessageActionpublic void onCardSummaryLoaded(CardSummary cardSummary)
ConversationDelegateCalled when the stripe card info is loaded.
onCardSummaryLoaded in interface ConversationDelegatecardSummary - The stripe card information.CardSummarypublic void onBrandMessengerConnectionStatusChanged(BrandMessengerConnectionStatus status)
ConversationDelegateCalled when the user's connection to BrandMessenger changes.
onBrandMessengerConnectionStatusChanged in interface ConversationDelegatestatus - The connection status.BrandMessengerConnectionStatuspublic void onBrandMessengerShown()
ConversationDelegateonBrandMessengerShown in interface ConversationDelegatepublic void onBrandMessengerHidden()
ConversationDelegateonBrandMessengerHidden in interface ConversationDelegatepublic void onConversationsListUpdated(java.util.List<Conversation> conversationsList)
ConversationDelegateonConversationsListUpdated in interface ConversationDelegateconversationsList - an updated list of Conversationpublic void onStripeFragmentShown()
public void onStripeFragmentClose()
public void onPurchaseComplete()
public void onShadedAreaClick()
public void onWebviewShown()
public void onWebviewHidden()
public void onFormFragmentShown()
public void closeFormFragment()
public void onFormComplete()