SalesIQChatListener
The Mobilisten Android SDK provides an interface for various chat event callbacks to help developers track different actions related to chat like open, close performed by the app user. The 'SalesIQChatListener' invokes callback methods for various chat actions performed by the visitors.
VisitorChat object returned in the callback will hold the properties mentioned in the following link. The method returns an instance of the Visitor Chat class, which contains information related to the chat.
You need to follow the steps below to implement the chat event handler:
Step 1:
public class MySalesIQChatListener implements SalesIQChatListener
{
//override methods
}
Step 2:
ZohoSalesIQ.Chat.setListener(new MySalesIQChatListener());
Method | Invoked when |
handleChatViewOpen() | a chat window is opened |
handleChatViewClose() | a chat window is closed. |
handleChatOpened() | a chat is started by the visitor. |
handleChatClosed() | a chat ends. |
handleChatAttended() | a chat is picked up. |
handleChatMissed() | a chat is missed. |
handleChatReOpened() | a chat is reopened. |
handleRating() | a chat is rated by the visitor after the chat is closed. This API returns the chat(of type VisitorChat) missed. |
handleFeedback() | feedback is given for a chat after it is closed. This API returns the chat(of type VisitorChat) missed. |
Example:
Copied