... | ... | @@ -80,58 +80,58 @@ ListenersProvider.sdksipListener = object : SDKSIPListener { |
|
|
ListenersProvider.sdksipListener = new SDKSIPListener() {
|
|
|
@Override
|
|
|
public void updateCallState(@NonNull String callState) {
|
|
|
|
|
|
//todo This method is called to communicate the current call state to the UI. See more about CallStates below.
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void updateDuration(@NonNull String duration) {
|
|
|
|
|
|
//todo Updates Call Duration in real time. Useful in UI to show the user how much time is spent in the call.
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void updateCallState(@NonNull CallState callState) {
|
|
|
|
|
|
//todo Same as the the Update callState before
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void callStartOrStop(boolean start, @NonNull String duration) {
|
|
|
|
|
|
//todo This method is invoked when the Ringing is stopped. If the Call has been disconnected from the other side this method will have start = false.
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void incomingCallIdDeclaration(@NonNull String callid) {
|
|
|
|
|
|
//todo Declares the Incoming callId.
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void updateDisplayStatus(@NonNull DisplayStatus displayStatus) {
|
|
|
|
|
|
//todo Can show the display status like Registered.InvalidLogIn or Registering etc. More about it below.
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void onMissedCall(@NonNull String s, boolean b) {
|
|
|
|
|
|
//todo When one Peer to Peer call is missed by the user then this method is called. Can be helpful to keep log of missed calls or create missed call alerts
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void updateCallInfo(@NonNull CallParameters callParameters) {
|
|
|
|
|
|
//todo Updates the callParameters. callParameters stores all kinds of data useful to keep logs.
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void updateBalance(@NonNull String balance) {
|
|
|
|
|
|
//todo Useful to show balance in the UI
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void disconnectedErrorCode(int i) {
|
|
|
|
|
|
//todo If the call gets disconnected for some network reason then this method provides the error code
|
|
|
}
|
|
|
};
|
|
|
|
|
|
```
|
|
|
|
|
|
3. See [Others Guide](Other-Important-Topics) for more information about callstates , callParameters , DisplayStatus etc.
|
|
|
3. See [Others Topics](Other-Important-Topics) for more information about callstates , callParameters , DisplayStatus etc.
|
|
|
|
|
|
#### **Important** `ListenersProvider.sdksipListener` and `ListenersProvider.sdksipListener` must be initialized in currently relevant Activities' onResume/onStart/onCreate methods. The activity that had implemented these interfaces the last, will be the one getting the callbacks. These interfaces act as bridges between UI and the core functionalities. So if Any of these interfaces is not connected to UI, UI can not get any info on what's going on inside.
|
|
|
|
... | ... | |