onSessionConnected(); executed when socket connection is established. One can open chat module after this event.
onSessionDisconnected(String reason); executed when socket connection is closed and chat is no longer available. ‘reason’ will give the reason for disconnection of the socket.
onAgentOnline(); executed when agent becomes online. Use only if required.
onAgentOffline(); executed when agent becomes offline. Use only if required.
onAgentAvailable(); executed when agent is available to chat. Use only if required.
onCallConnected(CallType callType); executed when direct Video/Audio call is connected to the agent. Use only if required.
onCallDIsconnected(CallType callType); executed when direct Video/Audio call is disconnected. Use only if required.
callDisconnectWithReason(String reason); executed when direct Audio/Video call is disconnected automatically.
onTriggerEvent(String eventName); executed when a custom trigger event has been set and clicked.
onChatClosed(); executed when agent closes the chat. Use only if required.
onChatWidgetClose(); executed when user closes the chat screen. Use only if required.
onTagChange(JSONObject tagJsonObject); executed whenever tag is changed from agent.
noAgentAvailable(); Executed when no agent is available.
onWaitDialogAppear();executed when visitor sends a call request.
onWaitDialogDisappear(); executed when agent accepts call request.
onCoBrowseConnect(String s) : Will be invoked when co browse session is connected and also you can get random id from its argument.
onAgentConnected() : This is invoked when agent start connection by entering same random id which user has got.
onCoBrowseDisconnect(String name) : this method is invoked when co browsing session is disconnected. Also it will tell you who (agent/user) has disconnected the session.
onCoBrowseFailed() : will be invoked when socket connection fails to connect.
onCoBrowseError() : will be invoked when socket gives any error while running session.