public interface Call
The application can create an outgoing call by calling Phone
.dial function:
The application can receive an incoming call on Phone.IncomingCallListener
:
Phone
Modifier and Type | Interface and Description |
---|---|
static class |
Call.CallStatus
The status of a Call.
|
static class |
Call.Direction
The enumeration of directions of a call
|
Modifier and Type | Method and Description |
---|---|
void |
acknowledge(CompletionHandler<java.lang.Void> callback)
Acknowledge (without answering) an incoming call.
|
void |
answer(MediaOption option,
CompletionHandler<java.lang.Void> callback)
Answers this call.
|
Call.Direction |
getDirection() |
Phone.FacingMode |
getFacingMode() |
CallMembership |
getFrom() |
android.graphics.Rect |
getLocalVideoViewSize() |
java.util.List<CallMembership> |
getMemberships() |
CallObserver |
getObserver() |
android.graphics.Rect |
getRemoteVideoViewSize() |
android.view.View |
getSharingRenderView() |
android.graphics.Rect |
getSharingViewSize() |
Call.CallStatus |
getStatus() |
CallMembership |
getTo() |
android.util.Pair<android.view.View,android.view.View> |
getVideoRenderViews() |
void |
hangup(CompletionHandler<java.lang.Void> callback)
Disconnects this call.
|
boolean |
isReceivingAudio() |
boolean |
isReceivingSharing() |
boolean |
isReceivingVideo() |
boolean |
isRemoteSendingAudio() |
boolean |
isRemoteSendingSharing() |
boolean |
isRemoteSendingVideo() |
boolean |
isSendingAudio() |
boolean |
isSendingDTMFEnabled() |
boolean |
isSendingSharing() |
boolean |
isSendingVideo() |
void |
reject(CompletionHandler<java.lang.Void> callback)
Rejects this call.
|
void |
sendDTMF(java.lang.String dtmf,
CompletionHandler<java.lang.Void> callback)
Sends DTMF events to the remote party.
|
void |
sendFeedback(int rating,
java.lang.String comment)
Sends feedback for this call to Cisco Spark team.
|
void |
setFacingMode(Phone.FacingMode facingMode) |
void |
setObserver(CallObserver observer) |
void |
setReceivingAudio(boolean receiving) |
void |
setReceivingSharing(boolean receiving) |
void |
setReceivingVideo(boolean receiving) |
void |
setSendingAudio(boolean sending) |
void |
setSendingVideo(boolean sending) |
void |
setSharingRenderView(android.view.View view) |
void |
setVideoRenderViews(android.util.Pair<android.view.View,android.view.View> videoRenderViews) |
void |
startSharing(CompletionHandler<java.lang.Void> callback) |
void |
stopSharing(CompletionHandler<java.lang.Void> callback) |
Phone.FacingMode getFacingMode()
void setFacingMode(Phone.FacingMode facingMode)
facingMode
- The camera facing mode.Call.Direction getDirection()
Call.CallStatus getStatus()
void setObserver(CallObserver observer)
observer
- Observer for the events of this callCallObserver getObserver()
java.util.List<CallMembership> getMemberships()
CallMembership getFrom()
CallMembership getTo()
android.graphics.Rect getLocalVideoViewSize()
android.graphics.Rect getRemoteVideoViewSize()
android.graphics.Rect getSharingViewSize()
boolean isRemoteSendingVideo()
boolean isRemoteSendingAudio()
boolean isRemoteSendingSharing()
boolean isSendingVideo()
void setSendingVideo(boolean sending)
sending
- True if this call is sending video. Otherwise, false.boolean isSendingAudio()
void setSendingAudio(boolean sending)
sending
- True if this call is sending audio. Otherwise, false.boolean isReceivingVideo()
void setReceivingVideo(boolean receiving)
receiving
- True if the local party of this *call* is receiving video. Otherwise, false.boolean isReceivingAudio()
void setReceivingAudio(boolean receiving)
receiving
- True if the local party of this *call* is receiving audio. Otherwise, false.boolean isReceivingSharing()
void setReceivingSharing(boolean receiving)
receiving
- True if the local party of this *call* is receiving content sharing. Otherwise, false.android.util.Pair<android.view.View,android.view.View> getVideoRenderViews()
void setVideoRenderViews(@Nullable android.util.Pair<android.view.View,android.view.View> videoRenderViews)
videoRenderViews
- render views for local and remote video of this call. If is nil, it will update the video state as inactive to the server side.android.view.View getSharingRenderView()
void setSharingRenderView(android.view.View view)
view
- The render view for the remote content sharing of this call. If is nil, it will update the content sharing state as inactive to the server side.void acknowledge(@NonNull CompletionHandler<java.lang.Void> callback)
callback
- A closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil.Call.CallStatus
void answer(@NonNull MediaOption option, @NonNull CompletionHandler<java.lang.Void> callback)
option
- Intended media options - audio only or audio and video - for the call.callback
- A closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil.Call.CallStatus
void reject(@NonNull CompletionHandler<java.lang.Void> callback)
callback
- A closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil.Call.CallStatus
void hangup(@NonNull CompletionHandler<java.lang.Void> callback)
callback
- A closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil.Call.CallStatus
boolean isSendingDTMFEnabled()
void sendDTMF(java.lang.String dtmf, @NonNull CompletionHandler<java.lang.Void> callback)
dtmf
- any combination of valid DTMF events matching regex mattern "^[0-9#\*abcdABCD]+$"callback
- A closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil.void sendFeedback(int rating, @Nullable java.lang.String comment)
rating
- The rating of the quality of this call between 1 and 5 where 5 means excellent quality.comment
- The comments for this call.void startSharing(@NonNull CompletionHandler<java.lang.Void> callback)
void stopSharing(@NonNull CompletionHandler<java.lang.Void> callback)
boolean isSendingSharing()