Customer Activity Messages
SDK has exposed API to send customer activity status to agent.
Examples activity messages are: Message window minimized, Message window restored.
The API method for sending the activity messages is exposed from the NuanMessaging class. You must have the instance of NuanMessaging class.
NuanMessaging nuanMessaging = NuanMessaging.getInstance();
Public Methods
To send an activity messages to an agent, use the public methods exposed from the NuanMessaging Class.
-
public void sendCustomerActivity(CustomerActivity activity,OnSuccessListener
listener, OnErrorListener error) Sends a activity messages to agent. You can also pass the optional success and error listener. Based on the resonse status, either Success or Error listener is invoked with the respective status of this request.
Response
An instance of the Response class is passed as an argument to OnErrorListener.onErrorResponse or OnSuccessListener.onResponse based on the status of this request.
Public Methods
-
public int getStatusCode()
getStatusCode method returns following values which denotes the status of this request.
200: Message was accepted by server
400: Request has incorrect parameters.
401: There is no such chat on server, chat should be started anew
403: The user does not have sufficient privileges to use the API or to access the requested site.
500: Server error.
NuanMessaging nuanMessaging = NuanMessaging.getInstance();
nuanMessaging.sendCustomerActivity(CustomerActivity.MINIMIZED);