DefaultVoipObserver
The DefaultVoipObserver
class is a no-op implementation of the IVoipObserver
event handler interface
intended to be used as a base class for application event handlers that are only interested in specific events.
This class implements all the Cloudonix SDK Client event endpoints, so the developer need only to override the event
handler implementation for the events they are interested in (also there is no need to call super
in such overridden
implementations).
Methods
unregister()
Remove this event listener from the Cloudonix Mobile SDK client instance where it was registered.
Application event handler implementations that are meant to be used as "throw-away" short lived event listeners should call this method to stop receiving events, once the use case is complete.
Usage Example
public void dial(String number) {
cxClient.addListener(new DefaultVoipObsever(){
@Override
public void onCallState(String callKey, CallState state, String remoteUri){
showStateUpdate(state);
if (state == CALL_STATE_DISCONNECTED)
unregister();
}
});
cxClient.dial(number);
}