public EPBotCustomInterface
The EPBotCustomInterface interface composed of methods allowing to catch specific class EPChatConversationFragment events.
class EPChatConversationFragment| Modifier and Type | Method and Description |
|---|---|
void |
epBotDidFinish(EPChatConversationFragment fragment,
java.lang.String botUUID,
java.util.Map<java.lang.String,co.eightysixpercent.bot.model.EPContextObject> botContext)
Called when the bot is finished. If the bot ends with a button, it is called when the button is displayed.
Otherwise, it is called when the end message is displayed.
|
void |
epContextDidChange(EPChatConversationFragment fragment,
java.lang.String botUUID,
java.util.Map<java.lang.String,co.eightysixpercent.bot.model.EPContextObject> botContext)
Called when the chat conversation context has been updated.
|
EPBotAppearance |
epGetCustomBotAppearance(EPChatConversationFragment fragment,
java.lang.String botUUID)
Called when the custom input has been answered.
|
EPMessageContent.Custom |
epGetCustomItemFromIdentifier(android.content.Context context,
java.lang.String botUUID,
java.lang.String customItemId,
java.util.Map<java.lang.String,? extends java.lang.Object> userInfo)
Called when a custom item is required by the bot.
|
void |
epMessageDidUpdate(EPChatConversationFragment fragment,
java.lang.String botUUID,
EPChatMessage lastMessage,
EPChatConversation chatConversation)
Called when the last chat conversation message has been created/updated.
|
void |
epOnActivityResult(EPChatConversationFragment fragment,
java.lang.String botUUID,
int requestCode,
int resultCode,
android.content.Intent data,
kotlin.jvm.functions.Function1<? super co.eightysixpercent.bot.model.EPActivityResult,kotlin.Unit> completion)
Called when the custom input has been answered.
|
void |
epStartCustomActivityFromIdentifier(EPChatConversationFragment fragment,
java.lang.String botUUID,
java.lang.String customInputTypeId,
boolean skippable)
Called when a custom input type is required by the bot.
|
void |
epUserDidInput(EPChatConversationFragment fragment,
java.lang.String botUUID,
EPMessageContent content,
java.util.Map<java.lang.String,co.eightysixpercent.bot.model.EPContextObject> botContext)
Called when a user just answered an input.
|
EPInputValidator |
epValidateTextInput(EPChatConversationFragment fragment,
java.lang.String botUUID,
java.lang.String contextKey)
Called each time the user type a letter after a threshold of 30ms when a text input is shown.
|
EPMessageContent.Custom epGetCustomItemFromIdentifier(android.content.Context context, java.lang.String botUUID, java.lang.String customItemId, java.util.Map<java.lang.String,? extends java.lang.Object> userInfo)
Called when a custom item is required by the bot.
context - The Context from which this method is called.botUUID - The uuid of the running bot.customItemId - The custom item id.userInfo - The provided infos to populate the itemclass EPMessageContent.Custom object representing the UI to show for this input.void epStartCustomActivityFromIdentifier(EPChatConversationFragment fragment, java.lang.String botUUID, java.lang.String customInputTypeId, boolean skippable)
Called when a custom input type is required by the bot.
fragment - The fragment from which this method is called.botUUID - The uuid of the running bot.customInputTypeId - The custom input type id.skippable - true If the custom input can be skippedvoid epOnActivityResult(EPChatConversationFragment fragment, java.lang.String botUUID, int requestCode, int resultCode, android.content.Intent data, kotlin.jvm.functions.Function1<? super co.eightysixpercent.bot.model.EPActivityResult,kotlin.Unit> completion)
Called when the custom input has been answered.
fragment - The fragment from which this method is called.botUUID - The uuid of the running bot.requestCode - The request code used to start the custom activity.resultCode - The result code of the activity.data - the Bundle returned from the activitycompletion - a message and objects to update the contextEPInputValidator epValidateTextInput(EPChatConversationFragment fragment, java.lang.String botUUID, java.lang.String contextKey)
Called each time the user type a letter after a threshold of 30ms when a text input is shown.
fragment - The fragment from which this method is called.botUUID - The uuid of the running bot.contextKey - The contextKey that will be associated with the answer in the contextEPBotAppearance epGetCustomBotAppearance(EPChatConversationFragment fragment, java.lang.String botUUID)
Called when the custom input has been answered.
fragment - The fragment from which this method is called.botUUID - The uuid of the running bot.void epMessageDidUpdate(EPChatConversationFragment fragment, java.lang.String botUUID, EPChatMessage lastMessage, EPChatConversation chatConversation)
Called when the last chat conversation message has been created/updated.
fragment - The fragment from which this method is called.botUUID - The uuid of the running bot.lastMessage - The last chat conversation message.chatConversation - The last message chat conversation.void epContextDidChange(EPChatConversationFragment fragment, java.lang.String botUUID, java.util.Map<java.lang.String,co.eightysixpercent.bot.model.EPContextObject> botContext)
Called when the chat conversation context has been updated.
fragment - The controller from which this method is called.botUUID - The uuid of the running bot.botContext - The chat conversation context.void epBotDidFinish(EPChatConversationFragment fragment, java.lang.String botUUID, java.util.Map<java.lang.String,co.eightysixpercent.bot.model.EPContextObject> botContext)
Called when the bot is finished. If the bot ends with a button, it is called when the button is displayed. Otherwise, it is called when the end message is displayed.
fragment - The fragment from which this method is called.botUUID - The uuid of the running bot.botContext - The chat conversation context.void epUserDidInput(EPChatConversationFragment fragment, java.lang.String botUUID, EPMessageContent content, java.util.Map<java.lang.String,co.eightysixpercent.bot.model.EPContextObject> botContext)
Called when a user just answered an input.
fragment - The controller from which this method is called.botUUID - The uuid of the running bot.content - The input answer content.botContext - The chat conversation context.