Package com.sinch.android.rtc.calling
Interface Call
-
public interface Call
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addCallListener(CallListener callListener)
Adds a listener to the call.void
answer()
Answers an incoming call.java.lang.String
getCallId()
Returns the call identifier.CallDetails
getDetails()
Returns metadata about the call.CallDirection
getDirection()
Returns theCallDirection
of the call.java.util.Map<java.lang.String,java.lang.String>
getHeaders()
Returns the headers.java.lang.String
getRemoteUserId()
Returns the identifier of the remote participant in the call.CallState
getState()
Returns theCallState
the call is currently in.void
hangup()
Ends the call, regardless of what state it is in.void
pauseVideo()
Pause the video capturing.void
removeCallListener(CallListener callListener)
Removes a listener from the call.void
resumeVideo()
Resume the video capturing.void
sendDTMF(java.lang.String keys)
Sends one or more DTMF tones for tone dialing.void
setBandwidthLimits(int maxAudioBitrate, int maxVideoBitrate)
Sets bandwidth limitations on negotiated media streams.
-
-
-
Method Detail
-
addCallListener
void addCallListener(CallListener callListener)
Adds a listener to the call.- Parameters:
callListener
- theCallListener
-
removeCallListener
void removeCallListener(CallListener callListener)
Removes a listener from the call.- Parameters:
callListener
- theCallListener
-
answer
void answer()
Answers an incoming call.- Throws:
MissingPermissionException
- If the application is missing permission to record audio
-
hangup
void hangup()
Ends the call, regardless of what state it is in. If the call is an incoming call that has not yet been answered, the call will be reported as denied to the caller.
-
getCallId
java.lang.String getCallId()
Returns the call identifier.- Returns:
- the call identifier.
-
getRemoteUserId
java.lang.String getRemoteUserId()
Returns the identifier of the remote participant in the call.- Returns:
- the identifier of the remote participant in the call.
-
getDetails
CallDetails getDetails()
Returns metadata about the call.- Returns:
- a
CallDetails
containing metadata about the call.
-
getState
CallState getState()
Returns theCallState
the call is currently in.- Returns:
- the state the call is currently in.
-
getDirection
CallDirection getDirection()
Returns theCallDirection
of the call.- Returns:
- the direction of the call.
-
sendDTMF
void sendDTMF(java.lang.String keys)
Sends one or more DTMF tones for tone dialing. (Only applicable for calls terminated to PSTN (Publicly Switched Telephone Network)).- Parameters:
keys
- May be a series of DTMF keys. Each key must be in [0-9, #, *, A-D].- Throws:
java.lang.IllegalArgumentException
- if any of the given DTMF keys is invalid
-
pauseVideo
void pauseVideo()
Pause the video capturing.
-
resumeVideo
void resumeVideo()
Resume the video capturing.
-
getHeaders
java.util.Map<java.lang.String,java.lang.String> getHeaders()
Returns the headers.IMPORTANT: If a call is initially received via remote push notifications, headers may not be immediately available due to push payload size limitations. If it's not immediately available, it will be available after the
onCallProgressing
oronCallEstablished
callbacks forCallListener
are called.- Returns:
- the headers.
-
setBandwidthLimits
void setBandwidthLimits(int maxAudioBitrate, int maxVideoBitrate)
Sets bandwidth limitations on negotiated media streams. Bitrate settings should be non-negative integers values in kbps. Setting bitrate to zero forces use of default values. Settings take effect only if applied before call starts.- Parameters:
maxAudioBitrate
- sets max audio bitrates in kbps.maxVideoBitrate
- sets max video bitrates in kbps.
-
-