addOnCallStatusChangeCallback()
Note: This API is supported from version 8.1.0-beta01.
The addOnCallStatusChangeCallback() API registers a callback to monitor changes in the call's state.
Parameters:
- callback (ZohoSalesIQResultCallback<SalesIQCallState>): A callback function that handles updates to the call status.
- onSuccess(SalesIQCallState state): Invoked when the call status changes, providing the updated status.
- onFailure(int errorCode, String errorMessage): Invoked if an error occurs while monitoring the call status, with an error code and descriptive message.
Syntax
Copiedvoid addOnCallStatusChangeCallback(ZohoSalesIQResultCallback<SalesIQCallState> callback);
Example
CopiedFunction1<ZohoSalesIQCalls.SalesIQCallState, Unit> callback = new Function1<ZohoSalesIQCalls.SalesIQCallState, Unit>() {
@Override
public Unit invoke(ZohoSalesIQCalls.SalesIQCallState salesIQCallStatus) {
// Your code here to handle call state changes
return Unit.INSTANCE;
}
};
ZohoSalesIQCalls.addOnCallStateChangeCallback(callback);
Copiedval callback = { status: ZohoSalesIQCalls.SalesIQCallState ->
// Your code here to handle call state changes
}
ZohoSalesIQCalls.addOnCallStatusChangeCallback(callback)