public interface Phone
The application can obtain a phone object from Webex object and use phone to call other Cisco Webex users or PSTN when enabled.
The phone must be registered before it can make or receive calls.
| Modifier and Type | Interface and Description |
|---|---|
static class |
Phone.AudioBRNMode
The enumeration of audio BNR mode choices, default is HP.
|
static class |
Phone.DefaultBandwidth
The enumeration of common bandwidth choices.
|
static class |
Phone.FacingMode
The enumeration of Camera facing modes.
|
static class |
Phone.H264LicenseAction
The options for H.264 video codec license from Cisco Systems, Inc
|
static interface |
Phone.IncomingCallListener
The interface for a listener for incoming call
|
static class |
Phone.ServiceUrlType
The enumeration of service url.
|
static class |
Phone.VideoStreamMode
The enumeration of remote video stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancel the currently outgoing call that has not been connected.
|
void |
deregister(CompletionHandler<java.lang.Void> callback)
Removes this *phone* from Cisco Webex cloud on behalf of the authenticated user.
|
void |
dial(java.lang.String dialString,
MediaOption option,
CompletionHandler<Call> callback)
Makes a call to an intended recipient on behalf of the authenticated user.
|
void |
disableVideoCodecActivation()
Prevents the SDK from poping up an Alert for the end user to approve the use of H.264 video codec license from Cisco Systems, Inc.
|
void |
enableAskingReadPhoneStatePermission(boolean enable)
Toggle to enable or disable ask for
Manifest.permission.READ_PHONE_STATE permission, true by default. |
void |
enableAudioBNR(boolean enable)
Enable audio background noise removal.
|
void |
enableAudioEnhancementForModels(java.util.List<java.lang.String> models)
Turn on audio enhancement for the specified device models.
|
void |
enableBackgroundConnection(boolean enable)
Set true to keep Webex server connection when minimize app.
|
void |
enableBackgroundStream(boolean enable)
Set true to keep video stream(include local and remote) when minimize app, else will stop.
|
AdvancedSetting |
getAdvancedSetting(java.lang.Class<? extends AdvancedSetting> clz)
Returns value of the advanced seting that has been set.
|
Phone.AudioBRNMode |
getAudioBNRMode()
Return the audio background noise removal mode.
|
int |
getAudioMaxBandwidth()
Deprecated.
|
int |
getAudioMaxRxBandwidth()
Return the current maximum receivning bandwidth of audio stream.
|
Phone.FacingMode |
getDefaultFacingMode()
Default camera facing mode of this phone, used as the default when dialing or answering a call.
|
Phone.IncomingCallListener |
getIncomingCallListener()
The listener for incoming call
|
java.lang.String |
getServiceUrl(Phone.ServiceUrlType serviceUrlType)
Return the required service url, return null if unregistered.
|
int |
getSharingMaxBandwidth()
Deprecated.
|
int |
getSharingMaxRxBandwidth()
Return the current maximum receiving bandwidth of content sharing stream.
|
java.lang.String |
getVideoCodecLicense()
Return the text of the H.264 codec license from Cisco Systems, Inc.
|
java.lang.String |
getVideoCodecLicenseURL()
Return the URL of the H.264 codec license from Cisco Systems, Inc.
|
int |
getVideoMaxBandwidth()
Deprecated.
|
int |
getVideoMaxRxBandwidth()
Return the current maximum receiving bandwidth of video stream.
|
int |
getVideoMaxTxBandwidth()
Return the current maximum sending bandwidth of video stream.
|
Phone.VideoStreamMode |
getVideoStreamMode()
Return the video stream mode.
|
boolean |
isAudioBNREnable()
True if audio background noise removal is open, otherwise false.
|
boolean |
isHardwareAccelerationEnabled()
Return True if Google hardware media codec is turned on for video.
|
void |
register(CompletionHandler<java.lang.Void> callback)
Registers this phone to Cisco Webex cloud on behalf of the authenticated user.
|
void |
requestVideoCodecActivation(android.app.AlertDialog.Builder builder,
CompletionHandler<Phone.H264LicenseAction> callback)
Pops up an Alert for the end user to approve the use of H.264 codec license from Cisco Systems, Inc.
|
void |
setAdvancedSetting(AdvancedSetting setting)
Set advanced setings for call.
|
void |
setAudioBNRMode(Phone.AudioBRNMode mode)
Set the audio background noise removal mode, default value is
Phone.AudioBRNMode.HP. |
void |
setAudioMaxBandwidth(int bandwidth)
Deprecated.
|
void |
setAudioMaxRxBandwidth(int bandwidth)
Set the max receivning bandwidth for audio in unit bps for the call.
|
void |
setDefaultFacingMode(Phone.FacingMode mode)
Set default camera facing mode of this phone, used as the default when dialing or answering a call.
|
void |
setHardwareAccelerationEnabled(boolean enable)
Turn on/off Google hardware media codec for video.
|
void |
setIncomingCallListener(Phone.IncomingCallListener listener)
Set the listener to listen to the incoming call to this Phone.
|
void |
setSharingMaxBandwidth(int bandwidth)
Deprecated.
|
void |
setSharingMaxRxBandwidth(int bandwidth)
Set the max receiving bandwidth for content sharing in unit bps for the call.
|
void |
setVideoMaxBandwidth(int bandwidth)
Deprecated.
|
void |
setVideoMaxRxBandwidth(int bandwidth)
Set the max receiving bandwidth for video in unit bps for the call.
|
void |
setVideoMaxTxBandwidth(int bandwidth)
Set the max sending bandwidth for video in unit bps for the call.
|
void |
setVideoStreamMode(Phone.VideoStreamMode videoStreamMode)
Set the video stream mode, default value is
Phone.VideoStreamMode.COMPOSITED. |
void |
startPreview(android.view.View view)
Render a preview of the local party before the call is answered.
|
void |
stopPreview()
Stop rendering the preview of the local party.
|
Phone.IncomingCallListener getIncomingCallListener()
void setIncomingCallListener(Phone.IncomingCallListener listener)
Phone.FacingMode getDefaultFacingMode()
void setDefaultFacingMode(Phone.FacingMode mode)
void register(@NonNull
CompletionHandler<java.lang.Void> callback)
It also creates the websocket and connects to Cisco Webex cloud.
Subsequent invocations of this method refresh the registration.
callback - A closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil.void deregister(@NonNull
CompletionHandler<java.lang.Void> callback)
It also disconnects the websocket from Cisco Webex cloud.
Subsequent invocations of this method behave as a no-op.
callback - A closure to be executed when completed, with error if the invocation is illegal or failed, otherwise nil.void dial(@NonNull
java.lang.String dialString,
@NonNull
MediaOption option,
@NonNull
CompletionHandler<Call> callback)
dialString - Intended recipient address in one of the supported formats.option - Intended media options - audio only or audio and video - for the call.callback - A closure to be executed when completed.void startPreview(android.view.View view)
view - an UI view for rendering video.void stopPreview()
void requestVideoCodecActivation(@NonNull
android.app.AlertDialog.Builder builder,
@Nullable
CompletionHandler<Phone.H264LicenseAction> callback)
builder - AlertDialog buildercallback - A closure to be executed when completed.void disableVideoCodecActivation()
java.lang.String getVideoCodecLicense()
java.lang.String getVideoCodecLicenseURL()
void setAudioMaxRxBandwidth(int bandwidth)
bandwidth - the suggest value could be Phone.DefaultBandwidth.MAX_BANDWIDTH_AUDIO.int getAudioMaxRxBandwidth()
void setVideoMaxRxBandwidth(int bandwidth)
bandwidth - the suggest value could be Phone.DefaultBandwidth.MAX_BANDWIDTH_90P, Phone.DefaultBandwidth.MAX_BANDWIDTH_180P,
Phone.DefaultBandwidth.MAX_BANDWIDTH_360P, Phone.DefaultBandwidth.MAX_BANDWIDTH_720P, or Phone.DefaultBandwidth.MAX_BANDWIDTH_1080P.int getVideoMaxRxBandwidth()
void setVideoMaxTxBandwidth(int bandwidth)
bandwidth - the suggest value could be Phone.DefaultBandwidth.MAX_BANDWIDTH_90P, Phone.DefaultBandwidth.MAX_BANDWIDTH_180P,
Phone.DefaultBandwidth.MAX_BANDWIDTH_360P, Phone.DefaultBandwidth.MAX_BANDWIDTH_720P, or Phone.DefaultBandwidth.MAX_BANDWIDTH_1080P.int getVideoMaxTxBandwidth()
void setSharingMaxRxBandwidth(int bandwidth)
bandwidth - the suggest value could be Phone.DefaultBandwidth.MAX_BANDWIDTH_SESSION.int getSharingMaxRxBandwidth()
boolean isHardwareAccelerationEnabled()
void setHardwareAccelerationEnabled(boolean enable)
enable - True to turn on Google hardware media codec. Otherwise, use OpenH264 software codec.void enableAudioEnhancementForModels(java.util.List<java.lang.String> models)
models - the list of device models, if the list is null or empty, turn off the audio enhancement.@Deprecated void setAudioMaxBandwidth(int bandwidth)
bandwidth - the suggest value could be Phone.DefaultBandwidth.MAX_BANDWIDTH_AUDIO.@Deprecated int getAudioMaxBandwidth()
@Deprecated void setVideoMaxBandwidth(int bandwidth)
bandwidth - the suggest value could be Phone.DefaultBandwidth.MAX_BANDWIDTH_90P, Phone.DefaultBandwidth.MAX_BANDWIDTH_180P,
Phone.DefaultBandwidth.MAX_BANDWIDTH_360P, Phone.DefaultBandwidth.MAX_BANDWIDTH_720P, or Phone.DefaultBandwidth.MAX_BANDWIDTH_1080P.@Deprecated int getVideoMaxBandwidth()
@Deprecated void setSharingMaxBandwidth(int bandwidth)
bandwidth - the suggest value could be Phone.DefaultBandwidth.MAX_BANDWIDTH_SESSION.@Deprecated int getSharingMaxBandwidth()
void enableBackgroundStream(boolean enable)
enable - true to keep video stream when minimize app, else will stop. Default is false.void enableBackgroundConnection(boolean enable)
enable - void setAdvancedSetting(AdvancedSetting setting)
For example, Phone.setAdvancedSetting(new VideoMaxTxFPS(30));
AdvancedSettingAdvancedSetting getAdvancedSetting(java.lang.Class<? extends AdvancedSetting> clz)
For example, AdvancedSetting setting = Phone.getAdvancedSetting(VideoMaxTxFPS.class);
AdvancedSettingvoid cancel()
void enableAudioBNR(boolean enable)
enable - true to open audio background noise removal, else will close. Default is false.boolean isAudioBNREnable()
void setAudioBNRMode(Phone.AudioBRNMode mode)
Phone.AudioBRNMode.HP.
This method only effective if set enableAudioBNR(boolean) to true.mode - the audio background noise removal mode.Phone.AudioBRNMode getAudioBNRMode()
Phone.AudioBRNModevoid setVideoStreamMode(Phone.VideoStreamMode videoStreamMode)
Phone.VideoStreamMode.COMPOSITED.videoStreamMode - the video stream mode.Phone.VideoStreamMode getVideoStreamMode()
Phone.VideoStreamModejava.lang.String getServiceUrl(Phone.ServiceUrlType serviceUrlType)
serviceUrlType - the type of service url.Phone.ServiceUrlTypevoid enableAskingReadPhoneStatePermission(boolean enable)
Manifest.permission.READ_PHONE_STATE permission, true by default.
When target SDK >= 30, this permission is required to check the network state, so SDK can auto-tuning performance during calls.enable - toggle to enable or disable ask for Manifest.permission.READ_PHONE_STATE permission, true by default.