| java.lang.Object | |
| ↳ | com.nexmo.sdk.conversation.client.Call |
Calls can be made towards specified users.
Example usage:
conversationClient.call(userArray, new RequestHandler() {
@Override
public void onSuccess(Call call) {
// Update the application UI here if needed with the ongoing call.
}
@Override
public void onError(NexmoAPIError error) {
// Update the application UI here if needed.
}
});
Subscribe for receiving incoming calls:
ResultListener callListener = new ResultListener() {
@Override
public void onSuccess(Call incomingCall) {
// Update the app UI with new event: incomingCall.toString();
}
});
conversationClient.callEvent().add(callListener);
Subscribe for member events in a call:
ResultListener callEventListener = new ResultListener() {
@Override
public void onSuccess(CallEvent event) {
// Update the app UI with new event: event.toString();
}
});
call.event().add(callEventListener);
Call available actions:
answer(RequestHandler).reject(RequestHandler).hangup(RequestHandler).Call properties:
from() is missing.| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| enum | Call.CALL_STATE | Enum for Call states. | |||||||||
| enum | Call.MEMBER_CALL_STATE | Enum for Call Member states.@constant | |||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Call(ConversationPlaceholderOutgoingPhoneCall placeholder) | |||||||||||
| Call(Conversation conversation) | |||||||||||
| Call(Conversation conversation, Member from) | |||||||||||
| Call(Conversation conversation, Member from, Call.CALL_STATE callState) | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
answer(RequestHandler<Void> listener)
Answer an incoming call.
| ||||||||||
| EventSource<CallEvent> |
event()
Listen for incoming member events for this call.
| ||||||||||
| Member |
from()
Get the Member that initiated the call.
| ||||||||||
| Call.CALL_STATE |
getCallState()
Get the Call State.
| ||||||||||
| final Conversation | getConversation() | ||||||||||
| String | getName() | ||||||||||
| void |
hangup(RequestHandler<Void> listener)
Hangs up the call while leaving the generated conversation.
| ||||||||||
| void |
reject(RequestHandler<Void> listener)
Reject an incoming call.
| ||||||||||
| final List<Member> |
to()
Get all the members invited in the call.
| ||||||||||
| String | toString() | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Answer an incoming call. If the call is already answered, an error will be dispatched. Note: answering the call means accepting invitation to conversation and enable audio.
| listener | The completion listener in charge of dispatching the result. |
|---|
Listen for incoming member events for this call. CallEvent types:
Hangs up the call while leaving the generated conversation. The audio is disabled.
| listener | The completion listener in charge of dispatching the result. |
|---|
Reject an incoming call.
Note: User cannot reject a call that is already answered answer(RequestHandler).
If the call is already in progress user can hangup hangup(RequestHandler) instead.
| listener | The completion listener in charge of dispatching the result. |
|---|
Get all the members invited in the call.
Does not contain the initiator of the call from().