Zoho Assist Callbacks
Use the SDK callbacks methods in the ISessionCallbacks class to override these methods to suit your app.
class ISessionCallbacks: SessionCallbacks {
/**
* Called when AddOn is available for the device via playstore.
* Can be used by the customer to install the plugin from their own sources if necessary.
*/
override fun onAddOnAvailableForDownload() {
}
/**
* Callback used to handle the received messages.
*/
override fun onMessageReceived(model: ChatModel) {
}
/**
* Callback used to handle UI changes for role change request.
*/
override fun onRoleChangeRequest() {
}
/**
* Callback used to handle screenshare request
*/
override fun onScreenShareRequest() {
}
/**
* Callback used to perform any operation when session ends.
*/
override fun onSessionEnded() {
}
/**
* Callback used to perform any operation when session starts.
*/
override fun onSessionStarted() {
}
/**
* Called when screen share is started, and can be used in conjunction
* with `startRemoteControlOnStart(false)` to prompt user for remote control permission
*/
override fun onScreenShareStarted() {
// AssistSession.INSTANCE.startAddon()
}
/**
* Called when participant status changes
*/
override fun onParticipantStateChange(
participantState: ParticipantState,
participantName: String
) {
}
/**
* Callback used to perform any operation using the response gotten from validating the token and session key.
*/
override fun onValidationResponse(response: String, responseCode: AssistSession.ApiResponse) {
when (responseCode) {
AssistSession.ApiResponse.SUCCESS -> {
}
AssistSession.ApiResponse.ERROR -> {
}
}
}
}