Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/telecom/Connection#nestedclasses) \| [Constants](https://developer.android.com/reference/android/telecom/Connection#constants) \| [Ctors](https://developer.android.com/reference/android/telecom/Connection#pubctors) \| [Methods](https://developer.android.com/reference/android/telecom/Connection#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/telecom/Connection#inhmethods)

# Connection

*** ** * ** ***


`
public


abstract
class
Connection
`


`


`

`

extends https://developer.android.com/reference/android/telecom/Conferenceable


`

`


`

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.telecom.Conferenceable](https://developer.android.com/reference/android/telecom/Conferenceable) ||
|   | ↳ | android.telecom.Connection |

<br />

*** ** * ** ***

Represents a phone call or connection to a remote endpoint that carries voice and/or video
traffic.


Implementations create a custom subclass of `Connection` and return it to the framework
as the return value of
`https://developer.android.com/reference/android/telecom/ConnectionService#onCreateIncomingConnection(android.telecom.PhoneAccountHandle,%20android.telecom.ConnectionRequest)`
or
`https://developer.android.com/reference/android/telecom/ConnectionService#onCreateOutgoingConnection(android.telecom.PhoneAccountHandle,%20android.telecom.ConnectionRequest)`.
Implementations are then responsible for updating the state of the `Connection`, and
must call `https://developer.android.com/reference/android/telecom/Connection#destroy()` to signal to the framework that the `Connection` is no
longer used and associated resources may be recovered.


Subclasses of `Connection` override the `on*` methods to provide the
`https://developer.android.com/reference/android/telecom/ConnectionService`'s implementation of calling functionality. The `on*` methods are
called by Telecom to inform an instance of a `Connection` of actions specific to that
`Connection` instance.


Basic call support requires overriding the following methods: `https://developer.android.com/reference/android/telecom/Connection#onAnswer()`,
`https://developer.android.com/reference/android/telecom/Connection#onDisconnect()`, `https://developer.android.com/reference/android/telecom/Connection#onReject()`, `https://developer.android.com/reference/android/telecom/Connection#onAbort()`


Where a `Connection` has `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SUPPORT_HOLD`, the `https://developer.android.com/reference/android/telecom/Connection#onHold()` and
`https://developer.android.com/reference/android/telecom/Connection#onUnhold()` methods should be overridden to provide hold support for the
`Connection`.


Where a `Connection` supports a variation of video calling (e.g. the
`CAPABILITY_SUPPORTS_VT_*` capability bits), `https://developer.android.com/reference/android/telecom/Connection#onAnswer(int)` should be overridden
to support answering a call as a video call.


Where a `Connection` has `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_IS_EXTERNAL_CALL` and
`https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_CAN_PULL_CALL`, `https://developer.android.com/reference/android/telecom/Connection#onPullExternalCall()` should be overridden to provide
support for pulling the external call.


Where a `Connection` supports conference calling `https://developer.android.com/reference/android/telecom/Connection#onSeparate()` should be
overridden.


There are a number of other `on*` methods which a `Connection` can choose to
implement, depending on whether it is concerned with the associated calls from Telecom. If,
for example, call events from a `https://developer.android.com/reference/android/telecom/InCallService` are handled,
`https://developer.android.com/reference/android/telecom/Connection#onCallEvent(java.lang.String,%20android.os.Bundle)` should be overridden. Another example is
`https://developer.android.com/reference/android/telecom/Connection#onExtrasChanged(android.os.Bundle)`, which should be overridden if the `Connection` wishes to
make use of extra information provided via the `https://developer.android.com/reference/android/telecom/Call#putExtras(android.os.Bundle)` and
`https://developer.android.com/reference/android/telecom/Call#removeExtras(java.lang.String[])` methods.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/telecom/Connection.RttModifyStatus` Provides constants to represent the results of responses to session modify requests sent via `https://developer.android.com/reference/android/telecom/Call#sendRttRequest()` |
| ` class` | `https://developer.android.com/reference/android/telecom/Connection.RttTextStream` Provides methods to read and write RTT data to/from the in-call app. |
| ` class` | `https://developer.android.com/reference/android/telecom/Connection.VideoProvider` Provides a means of controlling the video session associated with a `https://developer.android.com/reference/android/telecom/Connection`. |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_AMR` Adaptive Multi-rate audio codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_AMR_WB` Adaptive Multi-rate wideband audio codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_EVRC` Enhanced Variable Rate Codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_EVRC_B` Enhanced Variable Rate Codec B. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_EVRC_NW` Enhanced Variable Rate Narrowband-Wideband Codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_EVRC_WB` Enhanced Variable Rate Wideband Codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_EVS_FB` Enhanced Voice Services Fullband audio codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_EVS_NB` Enhanced Voice Services Narrowband audio codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_EVS_SWB` Enhanced Voice Services Super-Wideband audio codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_EVS_WB` Enhanced Voice Services Wideband audio codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_G711A` ITU-T G711A audio codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_G711AB` ITU-T G711AB audio codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_G711U` ITU-T G711U audio codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_G722` ITU-T G722 audio codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_G723` ITU-T G723 audio codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_G729` ITU-T G729 audio codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_GSM_EFR` GSM Enhanced Full-Rate audio codec, also known as GSM-EFR, GSM 06.60, or simply EFR. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_GSM_FR` GSM Full-Rate audio codec, also known as GSM-FR, GSM 06.10, GSM, or simply FR. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_GSM_HR` GSM Half Rate audio codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_NONE` Indicates that the audio codec is currently not specified or is unknown. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_QCELP13K` Qualcomm code-excited linear prediction 13 kilobit audio codec. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_ADD_PARTICIPANT` When set, indicates that this `https://developer.android.com/reference/android/telecom/Connection` supports initiation of a conference call by directly adding participants using `https://developer.android.com/reference/android/telecom/Connection#onAddConferenceParticipants(java.util.List<android.net.Uri>)`. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO` When set, prevents a video call from being downgraded to an audio-only call. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_CAN_PAUSE_VIDEO` For video calls, indicates whether the outgoing video for the call can be paused using the `https://developer.android.com/reference/android/telecom/VideoProfile#STATE_PAUSED` VideoState. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_CAN_PULL_CALL` When set for an external connection, indicates that this `Connection` can be pulled from a remote device to the current device. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_CAN_SEND_RESPONSE_VIA_CONNECTION` Indicates that the connection itself wants to handle any sort of reply response, rather than relying on SMS. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_CAN_UPGRADE_TO_VIDEO` *This constant was deprecated in API level 29. Use `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL` and `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL` to indicate for a call whether or not video calling is supported.* |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_DISCONNECT_FROM_CONFERENCE` Connection is able to be individually disconnected when in a `Conference`. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_HOLD` Connection can currently be put on hold or unheld. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_MANAGE_CONFERENCE` Connection supports conference management. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_MERGE_CONFERENCE` Connections within a conference can be merged. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_MUTE` Connection can be muted. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_REMOTE_PARTY_SUPPORTS_RTT` Indicates whether the remote party supports RTT or not to the UI. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_RESPOND_VIA_TEXT` Connection supports responding via text option. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SEPARATE_FROM_CONFERENCE` Connection is able to be separated from its parent `Conference`, if any. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL` Local device supports bidirectional video calling. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SUPPORTS_VT_LOCAL_RX` Local device supports receiving video. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SUPPORTS_VT_LOCAL_TX` Local device supports transmitting video. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL` Remote device supports bidirectional video calling. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SUPPORTS_VT_REMOTE_RX` Remote device supports receiving video. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SUPPORTS_VT_REMOTE_TX` Remote device supports transmitting video. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SUPPORT_DEFLECT` Call supports the deflect feature. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SUPPORT_HOLD` Connection supports the hold feature. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SWAP_CONFERENCE` Connections within a conference can be swapped between foreground and background. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_TRANSFER` Indicates that this `Connection` can be transferred to another number. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_TRANSFER_CONSULTATIVE` Indicates that this `Connection` can perform a consultative transfer to another ongoing `Connection` that also has this capability. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EVENT_CALL_HOLD_FAILED` Connection event used to inform Telecom when a hold operation on a call has failed. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EVENT_CALL_MERGE_FAILED` Connection event used to inform `https://developer.android.com/reference/android/telecom/InCallService`s when the merging of two calls has failed. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EVENT_CALL_PULL_FAILED` Connection event used to inform `https://developer.android.com/reference/android/telecom/InCallService`s when pulling of an external call has failed. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EVENT_CALL_REMOTELY_HELD` Connection event used to inform `https://developer.android.com/reference/android/telecom/InCallService`s when a call has been put on hold by the remote party. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EVENT_CALL_REMOTELY_UNHELD` Connection event used to inform `https://developer.android.com/reference/android/telecom/InCallService`s when a call which was remotely held (see `https://developer.android.com/reference/android/telecom/Connection#EVENT_CALL_REMOTELY_HELD`) has been un-held by the remote party. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EVENT_CALL_RESUME_FAILED` Connection event used to inform Telecom when a resume operation on a call has failed. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EVENT_CALL_SWITCH_FAILED` Connection event used to inform Telecom when a switch operation on a call has failed. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EVENT_DISCONNECT_FAILED` Connection event used to inform Telecom when a disconnect request fails during a call merge. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EVENT_MERGE_COMPLETE` Connection event used to inform `https://developer.android.com/reference/android/telecom/InCallService`s when the process of merging a Connection into a conference has completed. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EVENT_MERGE_START` Connection event used to inform `https://developer.android.com/reference/android/telecom/InCallService`s when the process of merging a Connection into a conference has begun. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EVENT_ON_HOLD_TONE_END` Connection event used to inform Telecom that it should stop the on hold tone. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EVENT_ON_HOLD_TONE_START` Connection event used to inform Telecom that it should play the on hold tone. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EVENT_RTT_AUDIO_INDICATION_CHANGED` Connection event used to inform an `https://developer.android.com/reference/android/telecom/InCallService` that the RTT audio indication has changed. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EXTRA_ANSWERING_DROPS_FG_CALL` Boolean connection extra key set on a `https://developer.android.com/reference/android/telecom/Connection` in `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING` state to indicate that answering the call will cause the current active foreground call to be dropped. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EXTRA_ANSWERING_DROPS_FG_CALL_APP_NAME` String connection extra key set on a `https://developer.android.com/reference/android/telecom/Connection` in `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING` state to indicate the name of the third-party app which is responsible for the current foreground call. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EXTRA_AUDIO_CODEC` The audio codec in use for the current `https://developer.android.com/reference/android/telecom/Connection`, if known. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EXTRA_AUDIO_CODEC_BANDWIDTH_KHZ` Float connection extra key used to store the audio codec bandwidth in khz for the current `https://developer.android.com/reference/android/telecom/Connection`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EXTRA_AUDIO_CODEC_BITRATE_KBPS` Float connection extra key used to store the audio codec bitrate in kbps for the current `https://developer.android.com/reference/android/telecom/Connection`. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EXTRA_CALL_SUBJECT` Connection extra key used to store the subject for an incoming call. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EXTRA_CHILD_ADDRESS` Connection extra key used to store a child number associated with the current connection. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EXTRA_IS_RTT_AUDIO_PRESENT` Boolean connection extra key set on the extras passed to `https://developer.android.com/reference/android/telecom/Connection#sendConnectionEvent(java.lang.String,%20android.os.Bundle)` which indicates that audio is present on the RTT call when the extra value is true. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EXTRA_LAST_FORWARDED_NUMBER` Connection extra key used to store the last forwarded number associated with the current connection. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EXTRA_LAST_KNOWN_CELL_IDENTITY` Last known cell identity key `https://developer.android.com/reference/android/telephony/CellIdentity` to be used to fill geo location header in case of an emergency call. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/telecom/Connection#EXTRA_SIP_INVITE` String Connection extra key used to store SIP invite fields for an incoming call for IMS call |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_ASSISTED_DIALING` Set by the framework to indicate that a connection is using assisted dialing. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_CROSS_SIM` Connection is using cross sim technology. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_HAS_CDMA_VOICE_PRIVACY` Indicates that the connection has CDMA Enhanced Voice Privacy enabled. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_HIGH_DEF_AUDIO` Connection is using high definition audio. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_IS_ADHOC_CONFERENCE` Set by the framework to indicate that a call is an adhoc conference call. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_IS_EXTERNAL_CALL` When set, indicates that the `Connection` does not actually exist locally for the `https://developer.android.com/reference/android/telecom/ConnectionService`. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_IS_RTT` Set by the framework to indicate that a connection has an active RTT session associated with it. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_IS_TETHERED_CALL` Set by a `https://developer.android.com/reference/android/telecom/ConnectionService` to indicate that this `https://developer.android.com/reference/android/telecom/Connection` represents a tethered call synchronized from a primary device. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_NETWORK_IDENTIFIED_EMERGENCY_CALL` Set by the framework to indicate that the network has identified a Connection as an emergency call. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_SELF_MANAGED` Set by the framework to indicate that the `https://developer.android.com/reference/android/telecom/Connection` originated from a self-managed `https://developer.android.com/reference/android/telecom/ConnectionService`. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_WIFI` Connection is using WIFI. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#STATE_ACTIVE` A connection is active. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#STATE_AUDIO_PROCESSING` The state of a call that is active with the network, but the audio from the call is being intercepted by an app on the local device. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#STATE_DIALING` An outgoing connection is in the dialing state. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#STATE_DISCONNECTED` A connection has been disconnected. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#STATE_HOLDING` A connection is on hold. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#STATE_INITIALIZING` The connection is initializing. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#STATE_NEW` The connection is new and not connected. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#STATE_PULLING_CALL` The state of an external connection which is in the process of being pulled from a remote device to the local device. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING` An incoming connection is in the ringing state. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#STATE_SIMULATED_RINGING` The state of a call that is being presented to the user after being in `https://developer.android.com/reference/android/telecom/Connection#STATE_AUDIO_PROCESSING`. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#VERIFICATION_STATUS_FAILED` Indicates that verification by the network failed. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#VERIFICATION_STATUS_NOT_VERIFIED` Indicates that the network could not perform verification. |
| `int` | `https://developer.android.com/reference/android/telecom/Connection#VERIFICATION_STATUS_PASSED` Indicates that verification by the network passed. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/telecom/Connection#Connection()() ` Create a new Connection. |

| ### Public methods ||
|---|---|
| ` static https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telecom/Connection#capabilitiesToString(int)(int capabilities) ` Renders a set of capability bits (`CAPABILITY_*`) as a human readable string. |
| ` static https://developer.android.com/reference/android/telecom/Connection` | ` https://developer.android.com/reference/android/telecom/Connection#createCanceledConnection()() ` Return a `Connection` which represents a canceled connection attempt. |
| ` static https://developer.android.com/reference/android/telecom/Connection` | ` https://developer.android.com/reference/android/telecom/Connection#createFailedConnection(android.telecom.DisconnectCause)(https://developer.android.com/reference/android/telecom/DisconnectCause disconnectCause) ` Return a `Connection` which represents a failed connection attempt. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#destroy()() ` Tears down the Connection object. |
| ` final https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/telecom/Connection#getAddress()() ` |
| ` final int` | ` https://developer.android.com/reference/android/telecom/Connection#getAddressPresentation()() ` |
| ` final boolean` | ` https://developer.android.com/reference/android/telecom/Connection#getAudioModeIsVoip()() ` |
| ` final int` | ` https://developer.android.com/reference/android/telecom/Connection#getAudioProcessingUseCase()() ` |
| ` final https://developer.android.com/reference/android/telecom/CallAudioState` | ` https://developer.android.com/reference/android/telecom/Connection#getCallAudioState()() ` *This method was deprecated in API level 34. Use `https://developer.android.com/reference/android/telecom/Connection#getCurrentCallEndpoint()`, `https://developer.android.com/reference/android/telecom/Connection#onAvailableCallEndpointsChanged(java.util.List<android.telecom.CallEndpoint>)` and `https://developer.android.com/reference/android/telecom/Connection#onMuteStateChanged(boolean)` instead.* |
| ` final https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telecom/Connection#getCallerDisplayName()() ` |
| ` final int` | ` https://developer.android.com/reference/android/telecom/Connection#getCallerDisplayNamePresentation()() ` |
| ` final int` | ` https://developer.android.com/reference/android/telecom/Connection#getCallerNumberVerificationStatus()() ` Gets the verification status for the phone number of an incoming call as identified in ATIS-1000082. |
| ` final https://developer.android.com/reference/android/telecom/Conference` | ` https://developer.android.com/reference/android/telecom/Connection#getConference()() ` |
| ` final https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/telecom/Conferenceable>` | ` https://developer.android.com/reference/android/telecom/Connection#getConferenceables()() ` Returns the connections or conferences with which this connection can be conferenced. |
| ` final int` | ` https://developer.android.com/reference/android/telecom/Connection#getConnectionCapabilities()() ` Returns the connection's capabilities, as a bit mask of the `CAPABILITY_*` constants. |
| ` final int` | ` https://developer.android.com/reference/android/telecom/Connection#getConnectionProperties()() ` Returns the connection's properties, as a bit mask of the `PROPERTY_*` constants. |
| ` final https://developer.android.com/reference/android/telecom/CallEndpoint` | ` https://developer.android.com/reference/android/telecom/Connection#getCurrentCallEndpoint()() ` Obtains the current CallEndpoint. |
| ` final https://developer.android.com/reference/android/telecom/DisconnectCause` | ` https://developer.android.com/reference/android/telecom/Connection#getDisconnectCause()() ` |
| ` final https://developer.android.com/reference/android/os/Bundle` | ` https://developer.android.com/reference/android/telecom/Connection#getExtras()() ` Returns the extras associated with this connection. |
| ` final int` | ` https://developer.android.com/reference/android/telecom/Connection#getState()() ` |
| ` final https://developer.android.com/reference/android/telecom/StatusHints` | ` https://developer.android.com/reference/android/telecom/Connection#getStatusHints()() ` |
| ` final https://developer.android.com/reference/android/telecom/Connection.VideoProvider` | ` https://developer.android.com/reference/android/telecom/Connection#getVideoProvider()() ` |
| ` final int` | ` https://developer.android.com/reference/android/telecom/Connection#getVideoState()() ` Returns the video state of the connection. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#handleRttUpgradeResponse(android.telecom.Connection.RttTextStream)(https://developer.android.com/reference/android/telecom/Connection.RttTextStream rttTextStream) ` Notifies this connection of a response to a previous remotely-initiated RTT upgrade request sent via `https://developer.android.com/reference/android/telecom/Connection#sendRemoteRttRequest()`. |
| ` final boolean` | ` https://developer.android.com/reference/android/telecom/Connection#isRingbackRequested()() ` Returns whether this connection is requesting that the system play a ringback tone on its behalf. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#notifyConferenceMergeFailed()() ` Called by a `https://developer.android.com/reference/android/telecom/ConnectionService` to notify Telecom that a `https://developer.android.com/reference/android/telecom/Conference#onMerge()` request failed. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onAbort()() ` Notifies this Connection of a request to abort. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onAddConferenceParticipants(java.util.List<android.net.Uri>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/Uri> participants) ` Supports initiation of a conference call by directly adding participants to an ongoing call. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onAnswer(int)(int videoState) ` Notifies this Connection, which is in `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING`, of a request to accept. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onAnswer()() ` Notifies this Connection, which is in `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING`, of a request to accept. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onAvailableCallEndpointsChanged(java.util.List<android.telecom.CallEndpoint>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/telecom/CallEndpoint> availableEndpoints) ` Notifies this Connection that the available call endpoints have been changed. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onCallAudioStateChanged(android.telecom.CallAudioState)(https://developer.android.com/reference/android/telecom/CallAudioState state) ` *This method was deprecated in API level 34. Use `https://developer.android.com/reference/android/telecom/Connection#onCallEndpointChanged(android.telecom.CallEndpoint)`, `https://developer.android.com/reference/android/telecom/Connection#onAvailableCallEndpointsChanged(java.util.List<android.telecom.CallEndpoint>)` and `https://developer.android.com/reference/android/telecom/Connection#onMuteStateChanged(boolean)` instead.* |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onCallEndpointChanged(android.telecom.CallEndpoint)(https://developer.android.com/reference/android/telecom/CallEndpoint callEndpoint) ` Notifies this Connection that the audio endpoint has been changed. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onCallEvent(java.lang.String,%20android.os.Bundle)(https://developer.android.com/reference/java/lang/String event, https://developer.android.com/reference/android/os/Bundle extras) ` Notifies this Connection of a `https://developer.android.com/reference/android/telecom/Call` event initiated from an `https://developer.android.com/reference/android/telecom/InCallService`. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onDeflect(android.net.Uri)(https://developer.android.com/reference/android/net/Uri address) ` Notifies this Connection, which is in `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING`, of a request to deflect. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onDisconnect()() ` Notifies this Connection of a request to disconnect. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onExtrasChanged(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle extras) ` Notifies this `https://developer.android.com/reference/android/telecom/Connection` of a change to the extras made outside the `https://developer.android.com/reference/android/telecom/ConnectionService`. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onHandoverComplete()() ` Notifies this `https://developer.android.com/reference/android/telecom/Connection` that a handover has completed. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onHold()() ` Notifies this Connection of a request to hold. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onMuteStateChanged(boolean)(boolean isMuted) ` Notifies this Connection that its audio mute state has been changed. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onPlayDtmfTone(char)(char c) ` Notifies this Connection of a request to play a DTMF tone. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onPostDialContinue(boolean)(boolean proceed) ` Notifies this Connection whether the user wishes to proceed with the post-dial DTMF codes. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onPullExternalCall()() ` Notifies this Connection of a request to pull an external call to the local device. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onReject()() ` Notifies this Connection, which is in `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING`, of a request to reject. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onReject(int)(int rejectReason) ` Notifies this Connection, which is in `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING`, of a request to reject. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onReject(java.lang.String)(https://developer.android.com/reference/java/lang/String replyMessage) ` Notifies this Connection, which is in `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING`, of a request to reject with a message. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onSeparate()() ` Notifies this Connection of a request to separate from its parent conference. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onShowIncomingCallUi()() ` Notifies this `https://developer.android.com/reference/android/telecom/Connection` that its `https://developer.android.com/reference/android/telecom/ConnectionService` is responsible for displaying its incoming call user interface for the `https://developer.android.com/reference/android/telecom/Connection`. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onSilence()() ` Notifies this Connection of a request to silence the ringer. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onStartRtt(android.telecom.Connection.RttTextStream)(https://developer.android.com/reference/android/telecom/Connection.RttTextStream rttTextStream) ` Notifies this `https://developer.android.com/reference/android/telecom/Connection` that the user has requested an RTT session. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onStateChanged(int)(int state) ` Notifies this Connection of an internal state change. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onStopDtmfTone()() ` Notifies this Connection of a request to stop any currently playing DTMF tones. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onStopRtt()() ` Notifies this `https://developer.android.com/reference/android/telecom/Connection` that it should terminate any existing RTT communication channel. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onTrackedByNonUiService(boolean)(boolean isTracked) ` Inform this Conenection when it will or will not be tracked by an non-UI `https://developer.android.com/reference/android/telecom/InCallService`. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onTransfer(android.net.Uri,%20boolean)(https://developer.android.com/reference/android/net/Uri address, boolean isConfirmationRequired) ` Notifies this Connection of a request to transfer to a target number. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onTransfer(android.telecom.Connection)(https://developer.android.com/reference/android/telecom/Connection toConnection) ` Notifies this Connection of a request to start a CONSULTATIVE transfer to another Connection. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onUnhold()() ` Notifies this Connection of a request to exit a hold state. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#onUsingAlternativeUi(boolean)(boolean isUsingAlternativeUi) ` Inform this Connection when it will or will not be tracked by an `https://developer.android.com/reference/android/telecom/InCallService` which can provide an InCall UI. |
| ` static https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telecom/Connection#propertiesToString(int)(int properties) ` Renders a set of property bits (`PROPERTY_*`) as a human readable string. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#putExtras(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle extras) ` Adds some extras to this `Connection`. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#queryLocationForEmergency(long,%20java.lang.String,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.location.Location,android.telecom.QueryLocationException>)(long timeoutMillis, https://developer.android.com/reference/java/lang/String provider, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/os/OutcomeReceiver<https://developer.android.com/reference/android/location/Location, https://developer.android.com/reference/android/telecom/QueryLocationException> callback) ` Query the device's location in order to place an Emergency Call. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#removeExtras(java.util.List<java.lang.String>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/java/lang/String> keys) ` Removes extras from this `Connection`. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#removeExtras(java.lang.String[])(https://developer.android.com/reference/java/lang/String keys) ` Removes extras from this `Connection`. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#requestBluetoothAudio(android.bluetooth.BluetoothDevice)(https://developer.android.com/reference/android/bluetooth/BluetoothDevice bluetoothDevice) ` *This method was deprecated in API level 34. Use `https://developer.android.com/reference/android/telecom/Connection#requestCallEndpointChange(android.telecom.CallEndpoint,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallEndpointException>)` instead.* |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#requestCallEndpointChange(android.telecom.CallEndpoint,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallEndpointException>)(https://developer.android.com/reference/android/telecom/CallEndpoint endpoint, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/os/OutcomeReceiver<https://developer.android.com/reference/java/lang/Void, https://developer.android.com/reference/android/telecom/CallEndpointException> callback) ` Request audio routing to a specific CallEndpoint. |
| ` void` | ` https://developer.android.com/reference/android/telecom/Connection#sendConnectionEvent(java.lang.String,%20android.os.Bundle)(https://developer.android.com/reference/java/lang/String event, https://developer.android.com/reference/android/os/Bundle extras) ` Sends an event associated with this `Connection` with associated event extras to the `https://developer.android.com/reference/android/telecom/InCallService`. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#sendRemoteRttRequest()() ` Informs listeners that the remote side of the call has requested an upgrade to include an RTT session in the call. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#sendRttInitiationFailure(int)(int reason) ` Informs listeners that a previously requested RTT session via `https://developer.android.com/reference/android/telecom/ConnectionRequest#isRequestingRtt()` or `https://developer.android.com/reference/android/telecom/Connection#onStartRtt(android.telecom.Connection.RttTextStream)` has failed. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#sendRttInitiationSuccess()() ` Informs listeners that a previously requested RTT session via `https://developer.android.com/reference/android/telecom/ConnectionRequest#isRequestingRtt()` or `https://developer.android.com/reference/android/telecom/Connection#onStartRtt(android.telecom.Connection.RttTextStream)` has succeeded. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#sendRttSessionRemotelyTerminated()() ` Informs listeners that a currently active RTT session has been terminated by the remote side of the coll. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setActive()() ` Sets state to active (e.g., an ongoing connection where two or more parties can actively communicate). |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setAddress(android.net.Uri,%20int)(https://developer.android.com/reference/android/net/Uri address, int presentation) ` Sets the value of the `https://developer.android.com/reference/android/telecom/Connection#getAddress()` property. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setAudioModeIsVoip(boolean)(boolean isVoip) ` Requests that the framework use VOIP audio mode for this connection. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setAudioProcessing(int)(int useCase) ` Sets state to audio processing (e.g. the call is active but the audio from the call is being intercepted by an app on the local device) and the usecase. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setAudioRoute(int)(int route) ` *This method was deprecated in API level 34. Use `https://developer.android.com/reference/android/telecom/Connection#requestCallEndpointChange(android.telecom.CallEndpoint,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallEndpointException>)` instead.* |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setCallerDisplayName(java.lang.String,%20int)(https://developer.android.com/reference/java/lang/String callerDisplayName, int presentation) ` Sets the caller display name (CNAP). |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setCallerNumberVerificationStatus(int)(int callerNumberVerificationStatus) ` Sets the verification status for the phone number of an incoming call as identified in ATIS-1000082. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setConferenceableConnections(java.util.List<android.telecom.Connection>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/telecom/Connection> conferenceableConnections) ` Sets the connections with which this connection can be conferenced. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setConferenceables(java.util.List<android.telecom.Conferenceable>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/telecom/Conferenceable> conferenceables) ` Similar to `https://developer.android.com/reference/android/telecom/Connection#setConferenceableConnections(java.util.List<android.telecom.Connection>)`, sets a list of connections or conferences with which this connection can be conferenced. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setConnectionCapabilities(int)(int connectionCapabilities) ` Sets the connection's capabilities as a bit mask of the `CAPABILITY_*` constants. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setConnectionProperties(int)(int connectionProperties) ` Sets the connection's properties as a bit mask of the `PROPERTY_*` constants. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setDialing()() ` Sets state to dialing (e.g., dialing an outbound connection). |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setDisconnected(android.telecom.DisconnectCause)(https://developer.android.com/reference/android/telecom/DisconnectCause disconnectCause) ` Sets state to disconnected. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setExtras(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle extras) ` Set some extras that can be associated with this `Connection`. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setInitialized()() ` Sets state to initialized (the Connection has been set up and is now ready to be used). |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setInitializing()() ` Sets state to initializing (this Connection is not yet ready to be used). |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setNextPostDialChar(char)(char nextChar) ` Informs listeners that this `Connection` has processed a character in the post-dial started state. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setOnHold()() ` Sets state to be on hold. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setPostDialWait(java.lang.String)(https://developer.android.com/reference/java/lang/String remaining) ` Informs listeners that this `Connection` is in a post-dial wait state. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setPulling()() ` Sets state to pulling (e.g. the connection is being pulled to the local device from another device). |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setRingbackRequested(boolean)(boolean ringback) ` Requests that the framework play a ringback tone. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setRinging()() ` Sets state to ringing (e.g., an inbound ringing connection). |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setSimulatedRinging()() ` Sets state to simulated ringing where its presented to the user after being in `https://developer.android.com/reference/android/telecom/Connection#STATE_AUDIO_PROCESSING`. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setStatusHints(android.telecom.StatusHints)(https://developer.android.com/reference/android/telecom/StatusHints statusHints) ` Sets the label and icon status to display in the in-call UI. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setVideoProvider(android.telecom.Connection.VideoProvider)(https://developer.android.com/reference/android/telecom/Connection.VideoProvider videoProvider) ` Sets the video connection provider. |
| ` final void` | ` https://developer.android.com/reference/android/telecom/Connection#setVideoState(int)(int videoState) ` Set the video state for the connection. |
| ` static https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telecom/Connection#stateToString(int)(int state) ` |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


## Constants

### AUDIO_CODEC_AMR

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_AMR
```

Adaptive Multi-rate audio codec.

<br />

Constant Value:

1
(0x00000001)


### AUDIO_CODEC_AMR_WB

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_AMR_WB
```

Adaptive Multi-rate wideband audio codec.

<br />

Constant Value:

2
(0x00000002)


### AUDIO_CODEC_EVRC

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_EVRC
```

Enhanced Variable Rate Codec. See 3GPP2 C.S0014-A.

<br />

Constant Value:

4
(0x00000004)


### AUDIO_CODEC_EVRC_B

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_EVRC_B
```

Enhanced Variable Rate Codec B. Commonly used on CDMA networks.

<br />

Constant Value:

5
(0x00000005)


### AUDIO_CODEC_EVRC_NW

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_EVRC_NW
```

Enhanced Variable Rate Narrowband-Wideband Codec.

<br />

Constant Value:

7
(0x00000007)


### AUDIO_CODEC_EVRC_WB

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_EVRC_WB
```

Enhanced Variable Rate Wideband Codec. See RFC5188.

<br />

Constant Value:

6
(0x00000006)


### AUDIO_CODEC_EVS_FB

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_EVS_FB
```

Enhanced Voice Services Fullband audio codec. See 3GPP TS 26.441.

<br />

Constant Value:

20
(0x00000014)


### AUDIO_CODEC_EVS_NB

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_EVS_NB
```

Enhanced Voice Services Narrowband audio codec. See 3GPP TS 26.441.

<br />

Constant Value:

17
(0x00000011)


### AUDIO_CODEC_EVS_SWB

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_EVS_SWB
```

Enhanced Voice Services Super-Wideband audio codec. See 3GPP TS 26.441.

<br />

Constant Value:

19
(0x00000013)


### AUDIO_CODEC_EVS_WB

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_EVS_WB
```

Enhanced Voice Services Wideband audio codec. See 3GPP TS 26.441.

<br />

Constant Value:

18
(0x00000012)


### AUDIO_CODEC_G711A

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_G711A
```

ITU-T G711A audio codec.

<br />

Constant Value:

13
(0x0000000d)


### AUDIO_CODEC_G711AB

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_G711AB
```

ITU-T G711AB audio codec.

<br />

Constant Value:

15
(0x0000000f)


### AUDIO_CODEC_G711U

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_G711U
```

ITU-T G711U audio codec.

<br />

Constant Value:

11
(0x0000000b)


### AUDIO_CODEC_G722

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_G722
```

ITU-T G722 audio codec.

<br />

Constant Value:

14
(0x0000000e)


### AUDIO_CODEC_G723

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_G723
```

ITU-T G723 audio codec.

<br />

Constant Value:

12
(0x0000000c)


### AUDIO_CODEC_G729

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_G729
```

ITU-T G729 audio codec.

<br />

Constant Value:

16
(0x00000010)


### AUDIO_CODEC_GSM_EFR

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_GSM_EFR
```

GSM Enhanced Full-Rate audio codec, also known as GSM-EFR, GSM 06.60, or simply EFR.

<br />

Constant Value:

8
(0x00000008)


### AUDIO_CODEC_GSM_FR

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_GSM_FR
```

GSM Full-Rate audio codec, also known as GSM-FR, GSM 06.10, GSM, or simply FR.

<br />

Constant Value:

9
(0x00000009)


### AUDIO_CODEC_GSM_HR

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_GSM_HR
```

GSM Half Rate audio codec.

<br />

Constant Value:

10
(0x0000000a)


### AUDIO_CODEC_NONE

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_NONE
```

Indicates that the audio codec is currently not specified or is unknown.

<br />

Constant Value:

0
(0x00000000)


### AUDIO_CODEC_QCELP13K

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUDIO_CODEC_QCELP13K
```

Qualcomm code-excited linear prediction 13 kilobit audio codec.

<br />

Constant Value:

3
(0x00000003)


### CAPABILITY_ADD_PARTICIPANT

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_ADD_PARTICIPANT
```

When set, indicates that this `https://developer.android.com/reference/android/telecom/Connection` supports initiation of a conference call
by directly adding participants using `https://developer.android.com/reference/android/telecom/Connection#onAddConferenceParticipants(java.util.List<android.net.Uri>)`. When
participants are added to a `https://developer.android.com/reference/android/telecom/Connection`, it will be replaced by a `https://developer.android.com/reference/android/telecom/Conference`
instance with `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_IS_ADHOC_CONFERENCE` set to indicate that it is an adhoc
conference call.

<br />

Constant Value:

67108864
(0x04000000)


### CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO
```

When set, prevents a video call from being downgraded to an audio-only call.


Should be set when the VideoState has the `https://developer.android.com/reference/android/telecom/VideoProfile#STATE_TX_ENABLED` or
`https://developer.android.com/reference/android/telecom/VideoProfile#STATE_RX_ENABLED` bits set to indicate that the connection cannot be
downgraded from a video call back to a VideoState of
`https://developer.android.com/reference/android/telecom/VideoProfile#STATE_AUDIO_ONLY`.


Intuitively, a call which can be downgraded to audio should also have local and remote
video
capabilities (see `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL` and
`https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL`).

<br />

Constant Value:

8388608
(0x00800000)


### CAPABILITY_CAN_PAUSE_VIDEO

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_CAN_PAUSE_VIDEO
```

For video calls, indicates whether the outgoing video for the call can be paused using
the `https://developer.android.com/reference/android/telecom/VideoProfile#STATE_PAUSED` VideoState.

<br />

Constant Value:

1048576
(0x00100000)


### CAPABILITY_CAN_PULL_CALL

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_CAN_PULL_CALL
```

When set for an external connection, indicates that this `Connection` can be pulled
from a remote device to the current device.


Should only be set on a `Connection` where `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_IS_EXTERNAL_CALL`
is set.

<br />

Constant Value:

16777216
(0x01000000)


### CAPABILITY_CAN_SEND_RESPONSE_VIA_CONNECTION

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_CAN_SEND_RESPONSE_VIA_CONNECTION
```

Indicates that the connection itself wants to handle any sort of reply response, rather than
relying on SMS.

<br />

Constant Value:

4194304
(0x00400000)


### CAPABILITY_CAN_UPGRADE_TO_VIDEO

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_CAN_UPGRADE_TO_VIDEO
```


**This constant was deprecated
in API level 29.**   

Use `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL` and
`https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL` to indicate for a call whether or not
video calling is supported.

Call can be upgraded to a video call.

<br />

Constant Value:

524288
(0x00080000)


### CAPABILITY_DISCONNECT_FROM_CONFERENCE

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_DISCONNECT_FROM_CONFERENCE
```

Connection is able to be individually disconnected when in a `Conference`.

<br />

Constant Value:

8192
(0x00002000)


### CAPABILITY_HOLD

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_HOLD
```

Connection can currently be put on hold or unheld. This is distinct from
`https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_SUPPORT_HOLD` in that although a connection may support 'hold' most times,
it does not at the moment support the function. This can be true while the call is in the
state `https://developer.android.com/reference/android/telecom/Connection#STATE_DIALING`, for example. During this condition, an in-call UI may
display a disabled 'hold' button.

<br />

Constant Value:

1
(0x00000001)


### CAPABILITY_MANAGE_CONFERENCE

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_MANAGE_CONFERENCE
```

Connection supports conference management. This capability only applies to
`https://developer.android.com/reference/android/telecom/Conference`s which can have `https://developer.android.com/reference/android/telecom/Connection`s as children.

<br />

Constant Value:

128
(0x00000080)


### CAPABILITY_MERGE_CONFERENCE

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_MERGE_CONFERENCE
```

Connections within a conference can be merged. A `https://developer.android.com/reference/android/telecom/ConnectionService` has the option to
add a `https://developer.android.com/reference/android/telecom/Conference` before the child `https://developer.android.com/reference/android/telecom/Connection`s are merged. This is how
CDMA-based `https://developer.android.com/reference/android/telecom/Connection`s are implemented. For these unmerged `https://developer.android.com/reference/android/telecom/Conference`s, this
capability allows a merge button to be shown while the conference is in the foreground
of the in-call UI.


This is only intended for use by a `https://developer.android.com/reference/android/telecom/Conference`.

<br />

Constant Value:

4
(0x00000004)


### CAPABILITY_MUTE

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_MUTE
```

Connection can be muted.

<br />

Constant Value:

64
(0x00000040)


### CAPABILITY_REMOTE_PARTY_SUPPORTS_RTT

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_REMOTE_PARTY_SUPPORTS_RTT
```

Indicates whether the remote party supports RTT or not to the UI.

<br />

Constant Value:

536870912
(0x20000000)


### CAPABILITY_RESPOND_VIA_TEXT

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_RESPOND_VIA_TEXT
```

Connection supports responding via text option.

<br />

Constant Value:

32
(0x00000020)


### CAPABILITY_SEPARATE_FROM_CONFERENCE

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_SEPARATE_FROM_CONFERENCE
```

Connection is able to be separated from its parent `Conference`, if any.

<br />

Constant Value:

4096
(0x00001000)


### CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL
```

Local device supports bidirectional video calling.

<br />

Constant Value:

768
(0x00000300)


### CAPABILITY_SUPPORTS_VT_LOCAL_RX

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_SUPPORTS_VT_LOCAL_RX
```

Local device supports receiving video.

<br />

Constant Value:

256
(0x00000100)


### CAPABILITY_SUPPORTS_VT_LOCAL_TX

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_SUPPORTS_VT_LOCAL_TX
```

Local device supports transmitting video.

<br />

Constant Value:

512
(0x00000200)


### CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL
```

Remote device supports bidirectional video calling.

<br />

Constant Value:

3072
(0x00000c00)


### CAPABILITY_SUPPORTS_VT_REMOTE_RX

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_SUPPORTS_VT_REMOTE_RX
```

Remote device supports receiving video.

<br />

Constant Value:

1024
(0x00000400)


### CAPABILITY_SUPPORTS_VT_REMOTE_TX

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_SUPPORTS_VT_REMOTE_TX
```

Remote device supports transmitting video.

<br />

Constant Value:

2048
(0x00000800)


### CAPABILITY_SUPPORT_DEFLECT

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_SUPPORT_DEFLECT
```

Call supports the deflect feature.

<br />

Constant Value:

33554432
(0x02000000)


### CAPABILITY_SUPPORT_HOLD

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_SUPPORT_HOLD
```

Connection supports the hold feature.

<br />

Constant Value:

2
(0x00000002)


### CAPABILITY_SWAP_CONFERENCE

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_SWAP_CONFERENCE
```

Connections within a conference can be swapped between foreground and background.
See `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_MERGE_CONFERENCE` for additional information.


This is only intended for use by a `https://developer.android.com/reference/android/telecom/Conference`.

<br />

Constant Value:

8
(0x00000008)


### CAPABILITY_TRANSFER

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_TRANSFER
```

Indicates that this `Connection` can be transferred to another
number.
Connection supports the confirmed and unconfirmed call transfer feature.

<br />

Constant Value:

134217728
(0x08000000)


### CAPABILITY_TRANSFER_CONSULTATIVE

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CAPABILITY_TRANSFER_CONSULTATIVE
```

Indicates that this `Connection` can perform a consultative transfer to another
ongoing `Connection` that also has this capability.

A consultative transfer request is initialted when `https://developer.android.com/reference/android/telecom/Connection#onTransfer(android.telecom.Connection)` is called
on a `Connection` with this capability.

See 3GPP TS 24.629 for more details.

<br />

Constant Value:

268435456
(0x10000000)


### EVENT_CALL_HOLD_FAILED

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EVENT_CALL_HOLD_FAILED
```

Connection event used to inform Telecom when a hold operation on a call has failed.


Sent via `https://developer.android.com/reference/android/telecom/Connection#sendConnectionEvent(java.lang.String,%20android.os.Bundle)`. The `https://developer.android.com/reference/android/os/Bundle` parameter is
expected to be null when this connection event is used.

<br />

Constant Value:

"android.telecom.event.CALL_HOLD_FAILED"


### EVENT_CALL_MERGE_FAILED

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EVENT_CALL_MERGE_FAILED
```

Connection event used to inform `https://developer.android.com/reference/android/telecom/InCallService`s when the merging of two calls has
failed. The User Interface should use this message to inform the user of the error.


Sent via `https://developer.android.com/reference/android/telecom/Connection#sendConnectionEvent(java.lang.String,%20android.os.Bundle)`. The `https://developer.android.com/reference/android/os/Bundle` parameter is
expected to be null when this connection event is used.

<br />

Constant Value:

"android.telecom.event.CALL_MERGE_FAILED"


### EVENT_CALL_PULL_FAILED

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EVENT_CALL_PULL_FAILED
```

Connection event used to inform `https://developer.android.com/reference/android/telecom/InCallService`s when pulling of an external call has
failed. The user interface should inform the user of the error.


Expected to be used by the `https://developer.android.com/reference/android/telecom/ConnectionService` when the `https://developer.android.com/reference/android/telecom/Call#pullExternalCall()`
API is called on a `https://developer.android.com/reference/android/telecom/Call` with the properties
`https://developer.android.com/reference/android/telecom/Call.Details#PROPERTY_IS_EXTERNAL_CALL` and
`https://developer.android.com/reference/android/telecom/Call.Details#CAPABILITY_CAN_PULL_CALL`, but the `https://developer.android.com/reference/android/telecom/ConnectionService` could not
pull the external call due to an error condition.


Sent via `https://developer.android.com/reference/android/telecom/Connection#sendConnectionEvent(java.lang.String,%20android.os.Bundle)`. The `https://developer.android.com/reference/android/os/Bundle` parameter is
expected to be null when this connection event is used.

<br />

Constant Value:

"android.telecom.event.CALL_PULL_FAILED"


### EVENT_CALL_REMOTELY_HELD

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EVENT_CALL_REMOTELY_HELD
```

Connection event used to inform `https://developer.android.com/reference/android/telecom/InCallService`s when a call has been put on hold by
the remote party.


This is different than the `https://developer.android.com/reference/android/telecom/Connection#STATE_HOLDING` state which indicates that the
call is being held locally on the device. When a capable `https://developer.android.com/reference/android/telecom/ConnectionService` receives
signalling to indicate that the remote party has put the call on hold, it can send this
connection event.

<br />

Constant Value:

"android.telecom.event.CALL_REMOTELY_HELD"


### EVENT_CALL_REMOTELY_UNHELD

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EVENT_CALL_REMOTELY_UNHELD
```

Connection event used to inform `https://developer.android.com/reference/android/telecom/InCallService`s when a call which was remotely held
(see `https://developer.android.com/reference/android/telecom/Connection#EVENT_CALL_REMOTELY_HELD`) has been un-held by the remote party.


This is different than the `https://developer.android.com/reference/android/telecom/Connection#STATE_HOLDING` state which indicates that the
call is being held locally on the device. When a capable `https://developer.android.com/reference/android/telecom/ConnectionService` receives
signalling to indicate that the remote party has taken the call off hold, it can send this
connection event.

<br />

Constant Value:

"android.telecom.event.CALL_REMOTELY_UNHELD"


### EVENT_CALL_RESUME_FAILED

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final String EVENT_CALL_RESUME_FAILED
```

Connection event used to inform Telecom when a resume operation on a call has failed.


Sent via `https://developer.android.com/reference/android/telecom/Connection#sendConnectionEvent(java.lang.String,%20android.os.Bundle)`. The `https://developer.android.com/reference/android/os/Bundle` parameter is
expected to be null when this connection event is used.

<br />

Constant Value:

"android.telecom.event.CALL_RESUME_FAILED"


### EVENT_CALL_SWITCH_FAILED

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EVENT_CALL_SWITCH_FAILED
```

Connection event used to inform Telecom when a switch operation on a call has failed.


Sent via `https://developer.android.com/reference/android/telecom/Connection#sendConnectionEvent(java.lang.String,%20android.os.Bundle)`. The `https://developer.android.com/reference/android/os/Bundle` parameter is
expected to be null when this connection event is used.

<br />

Constant Value:

"android.telecom.event.CALL_SWITCH_FAILED"


### EVENT_DISCONNECT_FAILED

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final String EVENT_DISCONNECT_FAILED
```

Connection event used to inform Telecom when a disconnect request fails during a call merge.


Sent via `https://developer.android.com/reference/android/telecom/Connection#sendConnectionEvent(java.lang.String,%20android.os.Bundle)`. The `https://developer.android.com/reference/android/os/Bundle` parameter is
expected to be null when this connection event is used.

<br />

Constant Value:

"android.telecom.event.DISCONNECT_FAILED"


### EVENT_MERGE_COMPLETE

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EVENT_MERGE_COMPLETE
```

Connection event used to inform `https://developer.android.com/reference/android/telecom/InCallService`s when the process of merging a
Connection into a conference has completed.


Sent via `https://developer.android.com/reference/android/telecom/Connection#sendConnectionEvent(java.lang.String,%20android.os.Bundle)`. The `https://developer.android.com/reference/android/os/Bundle` parameter is
expected to be null when this connection event is used.

<br />

Constant Value:

"android.telecom.event.MERGE_COMPLETE"


### EVENT_MERGE_START

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EVENT_MERGE_START
```

Connection event used to inform `https://developer.android.com/reference/android/telecom/InCallService`s when the process of merging a
Connection into a conference has begun.


Sent via `https://developer.android.com/reference/android/telecom/Connection#sendConnectionEvent(java.lang.String,%20android.os.Bundle)`. The `https://developer.android.com/reference/android/os/Bundle` parameter is
expected to be null when this connection event is used.

<br />

Constant Value:

"android.telecom.event.MERGE_START"


### EVENT_ON_HOLD_TONE_END

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EVENT_ON_HOLD_TONE_END
```

Connection event used to inform Telecom that it should stop the on hold tone. This is used
to stop a tone when the peer puts the current call on hold. Sent to Telecom via
`https://developer.android.com/reference/android/telecom/Connection#sendConnectionEvent(java.lang.String,%20android.os.Bundle)`.

<br />

Constant Value:

"android.telecom.event.ON_HOLD_TONE_END"


### EVENT_ON_HOLD_TONE_START

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EVENT_ON_HOLD_TONE_START
```

Connection event used to inform Telecom that it should play the on hold tone. This is used
to play a tone when the peer puts the current call on hold. Sent to Telecom via
`https://developer.android.com/reference/android/telecom/Connection#sendConnectionEvent(java.lang.String,%20android.os.Bundle)`.

<br />

Constant Value:

"android.telecom.event.ON_HOLD_TONE_START"


### EVENT_RTT_AUDIO_INDICATION_CHANGED

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EVENT_RTT_AUDIO_INDICATION_CHANGED
```

Connection event used to inform an `https://developer.android.com/reference/android/telecom/InCallService` that the RTT audio indication
has changed.

<br />

Constant Value:

"android.telecom.event.RTT_AUDIO_INDICATION_CHANGED"


### EXTRA_ANSWERING_DROPS_FG_CALL

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_ANSWERING_DROPS_FG_CALL
```

Boolean connection extra key set on a `https://developer.android.com/reference/android/telecom/Connection` in
`https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING` state to indicate that answering the call will cause the
current active foreground call to be dropped.

<br />

Constant Value:

"android.telecom.extra.ANSWERING_DROPS_FG_CALL"


### EXTRA_ANSWERING_DROPS_FG_CALL_APP_NAME

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_ANSWERING_DROPS_FG_CALL_APP_NAME
```

String connection extra key set on a `https://developer.android.com/reference/android/telecom/Connection` in `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING`
state to indicate the name of the third-party app which is responsible for the current
foreground call.


Used when `https://developer.android.com/reference/android/telecom/Connection#EXTRA_ANSWERING_DROPS_FG_CALL` is true to ensure that the default Phone app
is able to inform the user that answering the new incoming call will cause a call owned by
another app to be dropped when the incoming call is answered.

<br />

Constant Value:

"android.telecom.extra.ANSWERING_DROPS_FG_CALL_APP_NAME"


### EXTRA_AUDIO_CODEC

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_AUDIO_CODEC
```

The audio codec in use for the current `https://developer.android.com/reference/android/telecom/Connection`, if known. Examples of valid
values include `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_AMR_WB` and `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_EVS_WB`.


Value is one of the following:

- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_NONE`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_AMR`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_AMR_WB`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_QCELP13K`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_EVRC`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_EVRC_B`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_EVRC_WB`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_EVRC_NW`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_GSM_EFR`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_GSM_FR`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_GSM_HR`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_G711U`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_G723`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_G711A`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_G722`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_G711AB`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_G729`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_EVS_NB`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_EVS_SWB`
- `https://developer.android.com/reference/android/telecom/Connection#AUDIO_CODEC_EVS_FB`
  - Constant Value: "android.telecom.extra.AUDIO_CODEC"

### EXTRA_AUDIO_CODEC_BANDWIDTH_KHZ

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_AUDIO_CODEC_BANDWIDTH_KHZ
```

Float connection extra key used to store the audio codec bandwidth in khz for the current
`https://developer.android.com/reference/android/telecom/Connection`.

<br />

Constant Value:

"android.telecom.extra.AUDIO_CODEC_BANDWIDTH_KHZ"


### EXTRA_AUDIO_CODEC_BITRATE_KBPS

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_AUDIO_CODEC_BITRATE_KBPS
```

Float connection extra key used to store the audio codec bitrate in kbps for the current
`https://developer.android.com/reference/android/telecom/Connection`.

<br />

Constant Value:

"android.telecom.extra.AUDIO_CODEC_BITRATE_KBPS"


### EXTRA_CALL_SUBJECT

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_CALL_SUBJECT
```

Connection extra key used to store the subject for an incoming call. The user interface can
query this extra and display its contents for incoming calls. Will only be used if the
`https://developer.android.com/reference/android/telecom/PhoneAccount` supports the capability `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_CALL_SUBJECT`.

<br />

Constant Value:

"android.telecom.extra.CALL_SUBJECT"


### EXTRA_CHILD_ADDRESS

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_CHILD_ADDRESS
```

Connection extra key used to store a child number associated with the current connection.
Used to communicate to the user interface that the connection was received via
a child address (i.e. phone number) associated with the `https://developer.android.com/reference/android/telecom/PhoneAccount`'s primary
address.

<br />

Constant Value:

"android.telecom.extra.CHILD_ADDRESS"


### EXTRA_IS_RTT_AUDIO_PRESENT

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_IS_RTT_AUDIO_PRESENT
```

Boolean connection extra key set on the extras passed to
`https://developer.android.com/reference/android/telecom/Connection#sendConnectionEvent(java.lang.String,%20android.os.Bundle)` which indicates that audio is present
on the RTT call when the extra value is true.

<br />

Constant Value:

"android.telecom.extra.IS_RTT_AUDIO_PRESENT"


### EXTRA_LAST_FORWARDED_NUMBER

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_LAST_FORWARDED_NUMBER
```

Connection extra key used to store the last forwarded number associated with the current
connection. Used to communicate to the user interface that the connection was forwarded via
the specified number.

<br />

Constant Value:

"android.telecom.extra.LAST_FORWARDED_NUMBER"


### EXTRA_LAST_KNOWN_CELL_IDENTITY

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_LAST_KNOWN_CELL_IDENTITY
```

Last known cell identity key `https://developer.android.com/reference/android/telephony/CellIdentity` to be used to fill geo location header
in case of an emergency call. This entry will not be filled if call is not identified as
an emergency call. Only provided to the `https://developer.android.com/reference/android/telecom/ConnectionService` for the purpose of
placing an emergency call; will not be present in the `https://developer.android.com/reference/android/telecom/InCallService` layer.
The `https://developer.android.com/reference/android/telecom/ConnectionService`'s implementation will be logged for fine location access
when an outgoing call is placed in this case.

<br />

Constant Value:

"android.telecom.extra.LAST_KNOWN_CELL_IDENTITY"


### EXTRA_SIP_INVITE

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String EXTRA_SIP_INVITE
```

String Connection extra key used to store SIP invite fields for an incoming call for IMS call

<br />

Constant Value:

"android.telecom.extra.SIP_INVITE"


### PROPERTY_ASSISTED_DIALING

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROPERTY_ASSISTED_DIALING
```

Set by the framework to indicate that a connection is using assisted dialing.


This is used for outgoing calls.

<br />

**See also:**

- `https://developer.android.com/reference/android/telecom/TelecomManager#EXTRA_USE_ASSISTED_DIALING`

Constant Value:

512
(0x00000200)


### PROPERTY_CROSS_SIM

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROPERTY_CROSS_SIM
```

Connection is using cross sim technology.


Indicates that the `https://developer.android.com/reference/android/telecom/Connection` is using a cross sim technology which would
register IMS over internet APN of default data subscription.

<br />

<br />

Constant Value:

8192
(0x00002000)


### PROPERTY_HAS_CDMA_VOICE_PRIVACY

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROPERTY_HAS_CDMA_VOICE_PRIVACY
```

Indicates that the connection has CDMA Enhanced Voice Privacy enabled.

<br />

Constant Value:

32
(0x00000020)


### PROPERTY_HIGH_DEF_AUDIO

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROPERTY_HIGH_DEF_AUDIO
```

Connection is using high definition audio.


Indicates that the `https://developer.android.com/reference/android/telecom/Connection` is using a "high definition" audio codec. This usually
implies something like AMR wideband, but the interpretation of when a call is considered high
definition is left to the `https://developer.android.com/reference/android/telecom/ConnectionService` to decide.


Translates to `https://developer.android.com/reference/android/telecom/Call.Details#PROPERTY_HIGH_DEF_AUDIO`.

<br />

Constant Value:

4
(0x00000004)


### PROPERTY_IS_ADHOC_CONFERENCE

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROPERTY_IS_ADHOC_CONFERENCE
```

Set by the framework to indicate that a call is an adhoc conference call.


This is used for outgoing and incoming conference calls.

<br />

Constant Value:

4096
(0x00001000)


### PROPERTY_IS_EXTERNAL_CALL

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROPERTY_IS_EXTERNAL_CALL
```

When set, indicates that the `Connection` does not actually exist locally for the
`https://developer.android.com/reference/android/telecom/ConnectionService`.


Consider, for example, a scenario where a user has two devices with the same phone number.
When a user places a call on one devices, the telephony stack can represent that call on the
other device by adding is to the `https://developer.android.com/reference/android/telecom/ConnectionService` with the
`https://developer.android.com/reference/android/telecom/Connection#PROPERTY_IS_EXTERNAL_CALL` capability set.


An `https://developer.android.com/reference/android/telecom/ConnectionService` should not assume that all `https://developer.android.com/reference/android/telecom/InCallService`s will handle
external connections. Only those `https://developer.android.com/reference/android/telecom/InCallService`s which have the
`https://developer.android.com/reference/android/telecom/TelecomManager#METADATA_INCLUDE_EXTERNAL_CALLS` metadata set to `true` in its
manifest will see external connections.

<br />

Constant Value:

16
(0x00000010)


### PROPERTY_IS_RTT

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROPERTY_IS_RTT
```

Set by the framework to indicate that a connection has an active RTT session associated with
it.

<br />

Constant Value:

256
(0x00000100)


### PROPERTY_IS_TETHERED_CALL

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int PROPERTY_IS_TETHERED_CALL
```

Set by a `https://developer.android.com/reference/android/telecom/ConnectionService` to indicate that this `https://developer.android.com/reference/android/telecom/Connection` represents a
tethered call synchronized from a primary device.


Consider, for example, a scenario where a user has a watch paired with a phone. When a user
places a call on the phone, the telephony stack on the watch can represent that call by
adding it to the `https://developer.android.com/reference/android/telecom/ConnectionService` with this property set.


When this property is set, the Telecom framework manages local audio focus to pause local
media streams during an active call, as if that call was local. If the call does not
possess this property but does have `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_IS_EXTERNAL_CALL`, local voice audio
modes (e.g., `https://developer.android.com/reference/android/media/AudioManager#MODE_IN_CALL`) and speaker routing adjustments
are bypassed.


This property cannot be set for calls with `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_SELF_MANAGED` also set.

<br />

Constant Value:

16384
(0x00004000)


### PROPERTY_NETWORK_IDENTIFIED_EMERGENCY_CALL

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROPERTY_NETWORK_IDENTIFIED_EMERGENCY_CALL
```

Set by the framework to indicate that the network has identified a Connection as an emergency
call.


This is used for incoming (mobile-terminated) calls to indicate the call is from emergency
services.

<br />

Constant Value:

1024
(0x00000400)


### PROPERTY_SELF_MANAGED

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROPERTY_SELF_MANAGED
```

Set by the framework to indicate that the `https://developer.android.com/reference/android/telecom/Connection` originated from a self-managed
`https://developer.android.com/reference/android/telecom/ConnectionService`.


See `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SELF_MANAGED`.

<br />

Constant Value:

128
(0x00000080)


### PROPERTY_WIFI

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int PROPERTY_WIFI
```

Connection is using WIFI.


Used to indicate that a call is taking place over WIFI versus a carrier network.


Translates to `https://developer.android.com/reference/android/telecom/Call.Details#PROPERTY_WIFI`.

<br />

Constant Value:

8
(0x00000008)


### STATE_ACTIVE

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int STATE_ACTIVE
```

A connection is active. Both parties are connected to the call and can actively communicate.

<br />

Constant Value:

4
(0x00000004)


### STATE_AUDIO_PROCESSING

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int STATE_AUDIO_PROCESSING
```

The state of a call that is active with the network, but the audio from the call is
being intercepted by an app on the local device. Telecom does not hold audio focus in this
state, and the call will be invisible to the user except for a persistent notification.

<br />

Constant Value:

8
(0x00000008)


### STATE_DIALING

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int STATE_DIALING
```

An outgoing connection is in the dialing state. In this state the other party has not yet
answered the call and the user traditionally hears a ringback tone.

<br />

Constant Value:

3
(0x00000003)


### STATE_DISCONNECTED

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int STATE_DISCONNECTED
```

A connection has been disconnected. This is the final state once the user has been
disconnected from a call either locally, remotely or by an error in the service.

<br />

Constant Value:

6
(0x00000006)


### STATE_HOLDING

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int STATE_HOLDING
```

A connection is on hold.

<br />

Constant Value:

5
(0x00000005)


### STATE_INITIALIZING

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int STATE_INITIALIZING
```

The connection is initializing. This is generally the first state for a `Connection`
returned by a `https://developer.android.com/reference/android/telecom/ConnectionService`.

<br />

Constant Value:

0
(0x00000000)


### STATE_NEW

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int STATE_NEW
```

The connection is new and not connected.

<br />

Constant Value:

1
(0x00000001)


### STATE_PULLING_CALL

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int STATE_PULLING_CALL
```

The state of an external connection which is in the process of being pulled from a remote
device to the local device.


A connection can only be in this state if the `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_IS_EXTERNAL_CALL` property and
`https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_CAN_PULL_CALL` capability bits are set on the connection.

<br />

Constant Value:

7
(0x00000007)


### STATE_RINGING

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int STATE_RINGING
```

An incoming connection is in the ringing state. During this state, the user's ringer or
vibration feature will be activated.

<br />

Constant Value:

2
(0x00000002)


### STATE_SIMULATED_RINGING

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int STATE_SIMULATED_RINGING
```

The state of a call that is being presented to the user after being in
`https://developer.android.com/reference/android/telecom/Connection#STATE_AUDIO_PROCESSING`. The call is still active with the network in this case, and
Telecom will hold audio focus and play a ringtone if appropriate.

<br />

Constant Value:

9
(0x00000009)


### VERIFICATION_STATUS_FAILED

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int VERIFICATION_STATUS_FAILED
```

Indicates that verification by the network failed. This indicates there is a high likelihood
that the call did not originate from a valid source.

<br />

Constant Value:

2
(0x00000002)


### VERIFICATION_STATUS_NOT_VERIFIED

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int VERIFICATION_STATUS_NOT_VERIFIED
```

Indicates that the network could not perform verification.

<br />

Constant Value:

0
(0x00000000)


### VERIFICATION_STATUS_PASSED

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int VERIFICATION_STATUS_PASSED
```

Indicates that verification by the network passed. This indicates there is a high likelihood
that the call originated from a valid source.

<br />

Constant Value:

1
(0x00000001)


## Public constructors

### Connection

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Connection ()
```

Create a new Connection.

<br />

## Public methods

### capabilitiesToString

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static String capabilitiesToString (int capabilities)
```

Renders a set of capability bits (`CAPABILITY_*`) as a human readable string.

<br />

| Parameters ||
|---|---|
| `capabilities` | `int`: A capability bit field. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | A human readable string representation. <br /> |

### createCanceledConnection

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static Connection createCanceledConnection ()
```

Return a `Connection` which represents a canceled connection attempt. The returned
`Connection` will have state `https://developer.android.com/reference/android/telecom/Connection#STATE_DISCONNECTED`, and cannot be moved out of
that state. This connection should not be used for anything, and no other
`Connection`s should be attempted.


so users of this method need not maintain a reference to its return value to destroy it.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/Connection` | A `Connection` which indicates that the underlying connection should be canceled. <br /> |

### createFailedConnection

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static Connection createFailedConnection (DisconnectCause disconnectCause)
```

Return a `Connection` which represents a failed connection attempt. The returned
`Connection` will have a `https://developer.android.com/reference/android/telecom/DisconnectCause` and as specified,
and a `https://developer.android.com/reference/android/telecom/Connection#getState()` of `https://developer.android.com/reference/android/telecom/Connection#STATE_DISCONNECTED`.


The returned `Connection` can be assumed to `https://developer.android.com/reference/android/telecom/Connection#destroy()` itself when appropriate,
so users of this method need not maintain a reference to its return value to destroy it.

<br />

| Parameters ||
|---|---|
| `disconnectCause` | `DisconnectCause`: The disconnect cause, (see `https://developer.android.com/`). <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/Connection` | A `Connection` which indicates failure. <br /> |

### destroy

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void destroy ()
```

Tears down the Connection object.

<br />

### getAddress

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final Uri getAddress ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/Uri` | The address (e.g., phone number) to which this Connection is currently communicating. <br /> |

### getAddressPresentation

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getAddressPresentation ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | The presentation requirements for the address. See `https://developer.android.com/reference/android/telecom/TelecomManager` for valid values. <br /> |

### getAudioModeIsVoip

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean getAudioModeIsVoip ()
```

<br />

<br />

| Returns ||
|---|---|
| `boolean` | True if the connection's audio mode is VOIP. <br /> |

### getAudioProcessingUseCase

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getAudioProcessingUseCase ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | The audio processing use case of the call when the state is in `https://developer.android.com/reference/android/telecom/Connection#STATE_AUDIO_PROCESSING` Value is one of the following: - `https://developer.android.com/reference/android/telecom/Call#AUDIO_PROCESSING_USE_CASE_UNKNOWN` - `https://developer.android.com/reference/android/telecom/Call#AUDIO_PROCESSING_USE_CASE_VOICEMAIL` - `https://developer.android.com/reference/android/telecom/Call#AUDIO_PROCESSING_USE_CASE_CALL_SCREENING` - `https://developer.android.com/reference/android/telecom/Call#AUDIO_PROCESSING_USE_CASE_ASK_TO_HOLD` |

### getCallAudioState

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final CallAudioState getCallAudioState ()
```


**This method was deprecated
in API level 34.**   

Use `https://developer.android.com/reference/android/telecom/Connection#getCurrentCallEndpoint()`,
`https://developer.android.com/reference/android/telecom/Connection#onAvailableCallEndpointsChanged(java.util.List<android.telecom.CallEndpoint>)` and
`https://developer.android.com/reference/android/telecom/Connection#onMuteStateChanged(boolean)` instead.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/CallAudioState` | The audio state of the connection, describing how its audio is currently being routed by the system. This is `null` if this Connection does not directly know about its audio state. <br /> |

### getCallerDisplayName

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final String getCallerDisplayName ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The caller display name (CNAP). <br /> |

### getCallerDisplayNamePresentation

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getCallerDisplayNamePresentation ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | The presentation requirements for the handle. See `https://developer.android.com/reference/android/telecom/TelecomManager` for valid values. <br /> |

### getCallerNumberVerificationStatus

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getCallerNumberVerificationStatus ()
```

Gets the verification status for the phone number of an incoming call as identified in
ATIS-1000082.

<br />

| Returns ||
|---|---|
| `int` | the verification status. Value is one of the following: - `https://developer.android.com/reference/android/telecom/Connection#VERIFICATION_STATUS_NOT_VERIFIED` - `https://developer.android.com/reference/android/telecom/Connection#VERIFICATION_STATUS_PASSED` - `https://developer.android.com/reference/android/telecom/Connection#VERIFICATION_STATUS_FAILED` |

### getConference

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final Conference getConference ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/Conference` | The conference that this connection is a part of. Null if it is not part of any conference. <br /> |

### getConferenceables

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final List<Conferenceable> getConferenceables ()
```

Returns the connections or conferences with which this connection can be conferenced.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/telecom/Conferenceable>` | <br /> |

### getConnectionCapabilities

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getConnectionCapabilities ()
```

Returns the connection's capabilities, as a bit mask of the `CAPABILITY_*` constants.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getConnectionProperties

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getConnectionProperties ()
```

Returns the connection's properties, as a bit mask of the `PROPERTY_*` constants.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getCurrentCallEndpoint

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final CallEndpoint getCurrentCallEndpoint ()
```

Obtains the current CallEndpoint.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/CallEndpoint` | An object encapsulating the CallEndpoint. This value cannot be `null`. <br /> |

### getDisconnectCause

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final DisconnectCause getDisconnectCause ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/DisconnectCause` | The `https://developer.android.com/reference/android/telecom/DisconnectCause` for this connection. <br /> |

### getExtras

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final Bundle getExtras ()
```

Returns the extras associated with this connection.


Extras should be updated using `https://developer.android.com/reference/android/telecom/Connection#putExtras(android.os.Bundle)`.


Telecom or an `https://developer.android.com/reference/android/telecom/InCallService` can also update the extras via
`https://developer.android.com/reference/android/telecom/Call#putExtras(android.os.Bundle)`, and
`https://developer.android.com/reference/android/telecom/Call#removeExtras(java.util.List<java.lang.String>)`.


The connection is notified of changes to the extras made by Telecom or an
`https://developer.android.com/reference/android/telecom/InCallService` by `https://developer.android.com/reference/android/telecom/Connection#onExtrasChanged(android.os.Bundle)`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Bundle` | The extras associated with this connection. <br /> |

### getState

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getState ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | The state of this Connection. <br /> |

### getStatusHints

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final StatusHints getStatusHints ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/StatusHints` | The status hints for this connection. <br /> |

### getVideoProvider

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final Connection.VideoProvider getVideoProvider ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/Connection.VideoProvider` | <br /> |

### getVideoState

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getVideoState ()
```

Returns the video state of the connection.
Valid values: `https://developer.android.com/reference/android/telecom/VideoProfile#STATE_AUDIO_ONLY`,
`https://developer.android.com/reference/android/telecom/VideoProfile#STATE_BIDIRECTIONAL`,
`https://developer.android.com/reference/android/telecom/VideoProfile#STATE_TX_ENABLED`,
`https://developer.android.com/reference/android/telecom/VideoProfile#STATE_RX_ENABLED`.

<br />

| Returns ||
|---|---|
| `int` | The video state of the connection. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/telecom/VideoProfile#STATE_AUDIO_ONLY` - `https://developer.android.com/reference/android/telecom/VideoProfile#STATE_TX_ENABLED` - `https://developer.android.com/reference/android/telecom/VideoProfile#STATE_RX_ENABLED` - `https://developer.android.com/reference/android/telecom/VideoProfile#STATE_BIDIRECTIONAL` - `https://developer.android.com/reference/android/telecom/VideoProfile#STATE_PAUSED` |

### handleRttUpgradeResponse

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void handleRttUpgradeResponse (Connection.RttTextStream rttTextStream)
```

Notifies this connection of a response to a previous remotely-initiated RTT upgrade
request sent via `https://developer.android.com/reference/android/telecom/Connection#sendRemoteRttRequest()`. Acceptance of the request is
indicated by the supplied `https://developer.android.com/reference/android/telecom/Connection.RttTextStream` being non-null, and rejection is
indicated by `rttTextStream` being `null`

<br />

| Parameters ||
|---|---|
| `rttTextStream` | `Connection.RttTextStream`: The object that should be used to send text to or receive text from the in-call app. This value may be `null`. <br /> |

### isRingbackRequested

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isRingbackRequested ()
```

Returns whether this connection is requesting that the system play a ringback tone
on its behalf.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### notifyConferenceMergeFailed

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void notifyConferenceMergeFailed ()
```

Called by a `https://developer.android.com/reference/android/telecom/ConnectionService` to notify Telecom that a `https://developer.android.com/reference/android/telecom/Conference#onMerge()`
request failed.

<br />

### onAbort

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onAbort ()
```

Notifies this Connection of a request to abort.

<br />

### onAddConferenceParticipants

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onAddConferenceParticipants (List<Uri> participants)
```

Supports initiation of a conference call by directly adding participants to an ongoing call.

<br />

| Parameters ||
|---|---|
| `participants` | `List`: with which conference call will be formed. This value cannot be `null`. <br /> |

### onAnswer

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onAnswer (int videoState)
```

Notifies this Connection, which is in `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING`, of
a request to accept.


For managed `https://developer.android.com/reference/android/telecom/ConnectionService`s, this will be called when the user answers a call via
the default dialer's `https://developer.android.com/reference/android/telecom/InCallService`.


Although a self-managed `https://developer.android.com/reference/android/telecom/ConnectionService` provides its own incoming call UI, the
Telecom framework may request that the call is answered in the following circumstances:

- The user chooses to answer an incoming call via a Bluetooth device.
- A car mode `https://developer.android.com/reference/android/telecom/InCallService` is in use which has declared `https://developer.android.com/reference/android/telecom/TelecomManager#METADATA_INCLUDE_SELF_MANAGED_CALLS` in its manifest. Such an `https://developer.android.com/reference/android/telecom/InCallService` will be able to see calls from self-managed `https://developer.android.com/reference/android/telecom/ConnectionService`s, and will be able to display an incoming call UI on their behalf.

<br />

<br />

| Parameters ||
|---|---|
| `videoState` | `int`: The video state in which to answer the connection. <br /> |

### onAnswer

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onAnswer ()
```

Notifies this Connection, which is in `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING`, of
a request to accept.


For managed `https://developer.android.com/reference/android/telecom/ConnectionService`s, this will be called when the user answers a call via
the default dialer's `https://developer.android.com/reference/android/telecom/InCallService`.


Although a self-managed `https://developer.android.com/reference/android/telecom/ConnectionService` provides its own incoming call UI, the
Telecom framework may request that the call is answered in the following circumstances:

- The user chooses to answer an incoming call via a Bluetooth device.
- A car mode `https://developer.android.com/reference/android/telecom/InCallService` is in use which has declared `https://developer.android.com/reference/android/telecom/TelecomManager#METADATA_INCLUDE_SELF_MANAGED_CALLS` in its manifest. Such an `https://developer.android.com/reference/android/telecom/InCallService` will be able to see calls from self-managed `https://developer.android.com/reference/android/telecom/ConnectionService`s, and will be able to display an incoming call UI on their behalf.

<br />

<br />

### onAvailableCallEndpointsChanged

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onAvailableCallEndpointsChanged (List<CallEndpoint> availableEndpoints)
```

Notifies this Connection that the available call endpoints have been changed.

<br />

| Parameters ||
|---|---|
| `availableEndpoints` | `List`: The set of available CallEndpoint. This value cannot be `null`. <br /> |

### onCallAudioStateChanged

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onCallAudioStateChanged (CallAudioState state)
```


**This method was deprecated
in API level 34.**   

Use `https://developer.android.com/reference/android/telecom/Connection#onCallEndpointChanged(android.telecom.CallEndpoint)`,
`https://developer.android.com/reference/android/telecom/Connection#onAvailableCallEndpointsChanged(java.util.List<android.telecom.CallEndpoint>)` and
`https://developer.android.com/reference/android/telecom/Connection#onMuteStateChanged(boolean)` instead.

Notifies this Connection that the `https://developer.android.com/reference/android/telecom/Connection#getCallAudioState()` property has a new value.

<br />

| Parameters ||
|---|---|
| `state` | `CallAudioState`: The new connection audio state. <br /> |

### onCallEndpointChanged

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onCallEndpointChanged (CallEndpoint callEndpoint)
```

Notifies this Connection that the audio endpoint has been changed.

<br />

| Parameters ||
|---|---|
| `callEndpoint` | `CallEndpoint`: The current CallEndpoint. This value cannot be `null`. <br /> |

### onCallEvent

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onCallEvent (String event, 
                Bundle extras)
```

Notifies this Connection of a `https://developer.android.com/reference/android/telecom/Call` event initiated from an `https://developer.android.com/reference/android/telecom/InCallService`.


The `https://developer.android.com/reference/android/telecom/InCallService` issues a Call event via `https://developer.android.com/reference/android/telecom/Call#sendCallEvent(java.lang.String,%20android.os.Bundle)`.


Where possible, the Connection should make an attempt to handle `https://developer.android.com/reference/android/telecom/Call` events which
are part of the `android.telecom.*` namespace. The Connection should ignore any events
it does not wish to handle. Unexpected events should be handled gracefully, as it is
possible that a `https://developer.android.com/reference/android/telecom/InCallService` has defined its own Call events which a Connection is
not aware of.


See also `https://developer.android.com/reference/android/telecom/Call#sendCallEvent(java.lang.String,%20android.os.Bundle)`.

<br />

| Parameters ||
|---|---|
| `event` | `String`: The call event. <br /> |
| `extras` | `Bundle`: Extras associated with the call event. <br /> |

### onDeflect

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onDeflect (Uri address)
```

Notifies this Connection, which is in `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING`, of
a request to deflect.

<br />

| Parameters ||
|---|---|
| `address` | `Uri` <br /> |

### onDisconnect

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onDisconnect ()
```

Notifies this Connection of a request to disconnect.

<br />

### onExtrasChanged

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onExtrasChanged (Bundle extras)
```

Notifies this `https://developer.android.com/reference/android/telecom/Connection` of a change to the extras made outside the
`https://developer.android.com/reference/android/telecom/ConnectionService`.


These extras changes can originate from Telecom itself, or from an `https://developer.android.com/reference/android/telecom/InCallService` via
the `https://developer.android.com/reference/android/telecom/Call#putExtras(android.os.Bundle)` and
`https://developer.android.com/reference/android/telecom/Call#removeExtras(java.util.List<java.lang.String>)`.

<br />

| Parameters ||
|---|---|
| `extras` | `Bundle`: The new extras bundle. <br /> |

### onHandoverComplete

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onHandoverComplete ()
```

Notifies this `https://developer.android.com/reference/android/telecom/Connection` that a handover has completed.


A handover is initiated with `https://developer.android.com/reference/android/telecom/Call#handoverTo(android.telecom.PhoneAccountHandle,%20int,%20android.os.Bundle)` on the initiating side of the handover, and
`https://developer.android.com/reference/android/telecom/TelecomManager#acceptHandover(android.net.Uri,%20int,%20android.telecom.PhoneAccountHandle)`.

<br />

### onHold

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onHold ()
```

Notifies this Connection of a request to hold. `https://developer.android.com/reference/android/telecom/Connection#setOnHold()` should be within
the onHold() body in order to transition the call state to `https://developer.android.com/reference/android/telecom/Connection#STATE_HOLDING`.


Note: If the Connection does not transition to `https://developer.android.com/reference/android/telecom/Connection#STATE_HOLDING` within 2
seconds, the call will be disconnected.

<br />

### onMuteStateChanged

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onMuteStateChanged (boolean isMuted)
```

Notifies this Connection that its audio mute state has been changed.

<br />

| Parameters ||
|---|---|
| `isMuted` | `boolean`: The current mute state. <br /> |

### onPlayDtmfTone

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onPlayDtmfTone (char c)
```

Notifies this Connection of a request to play a DTMF tone.

<br />

| Parameters ||
|---|---|
| `c` | `char`: A DTMF character. <br /> |

### onPostDialContinue

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onPostDialContinue (boolean proceed)
```

Notifies this Connection whether the user wishes to proceed with the post-dial DTMF codes.

<br />

| Parameters ||
|---|---|
| `proceed` | `boolean` <br /> |

### onPullExternalCall

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onPullExternalCall ()
```

Notifies this Connection of a request to pull an external call to the local device.


The `https://developer.android.com/reference/android/telecom/InCallService` issues a request to pull an external call to the local device via
`https://developer.android.com/reference/android/telecom/Call#pullExternalCall()`.


For a Connection to be pulled, both the `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_CAN_PULL_CALL`
capability and `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_IS_EXTERNAL_CALL` property bits must be set.


For more information on external calls, see `https://developer.android.com/reference/android/telecom/Connection#PROPERTY_IS_EXTERNAL_CALL`.

<br />

### onReject

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onReject ()
```

Notifies this Connection, which is in `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING`, of
a request to reject.


For managed `https://developer.android.com/reference/android/telecom/ConnectionService`s, this will be called when the user rejects a call via
the default dialer's `https://developer.android.com/reference/android/telecom/InCallService`.


Although a self-managed `https://developer.android.com/reference/android/telecom/ConnectionService` provides its own incoming call UI, the
Telecom framework may request that the call is rejected in the following circumstances:

- The user chooses to reject an incoming call via a Bluetooth device.
- A car mode `https://developer.android.com/reference/android/telecom/InCallService` is in use which has declared `https://developer.android.com/reference/android/telecom/TelecomManager#METADATA_INCLUDE_SELF_MANAGED_CALLS` in its manifest. Such an `https://developer.android.com/reference/android/telecom/InCallService` will be able to see calls from self-managed `https://developer.android.com/reference/android/telecom/ConnectionService`s, and will be able to display an incoming call UI on their behalf.

<br />

<br />

### onReject

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onReject (int rejectReason)
```

Notifies this Connection, which is in `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING`, of a request to reject.


For managed `https://developer.android.com/reference/android/telecom/ConnectionService`s, this will be called when the user rejects a call via
the default dialer's `https://developer.android.com/reference/android/telecom/InCallService` using `https://developer.android.com/reference/android/telecom/Call#reject(int)`.

<br />

| Parameters ||
|---|---|
| `rejectReason` | `int`: the reason the user provided for rejecting the call. Value is one of the following: - `https://developer.android.com/reference/android/telecom/Call#REJECT_REASON_DECLINED` - `https://developer.android.com/reference/android/telecom/Call#REJECT_REASON_UNWANTED` |

### onReject

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onReject (String replyMessage)
```

Notifies this Connection, which is in `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING`, of
a request to reject with a message.

<br />

| Parameters ||
|---|---|
| `replyMessage` | `String` <br /> |

### onSeparate

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onSeparate ()
```

Notifies this Connection of a request to separate from its parent conference.

<br />

### onShowIncomingCallUi

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onShowIncomingCallUi ()
```

Notifies this `https://developer.android.com/reference/android/telecom/Connection` that its `https://developer.android.com/reference/android/telecom/ConnectionService` is responsible for
displaying its incoming call user interface for the `https://developer.android.com/reference/android/telecom/Connection`.


Will only be called for incoming calls added via a self-managed `https://developer.android.com/reference/android/telecom/ConnectionService`
(see `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SELF_MANAGED`), where the `https://developer.android.com/reference/android/telecom/ConnectionService`
should show its own incoming call user interface.


Where there are ongoing calls in other self-managed `https://developer.android.com/reference/android/telecom/ConnectionService`s, or in a
regular `https://developer.android.com/reference/android/telecom/ConnectionService`, and it is not possible to hold these other calls, the
Telecom framework will display its own incoming call user interface to allow the user to
choose whether to answer the new incoming call and disconnect other ongoing calls, or to
reject the new incoming call.


You should trigger the display of the incoming call user interface for your application by
showing a `https://developer.android.com/reference/android/app/Notification` with a full-screen `https://developer.android.com/reference/android/content/Intent` specified.

In your application code, you should create a `https://developer.android.com/reference/android/app/NotificationChannel` for
incoming call notifications from your app:

    NotificationChannel channel = new NotificationChannel(YOUR_CHANNEL_ID, "Incoming Calls",
             NotificationManager.IMPORTANCE_MAX);
    // other channel setup stuff goes here.

    // We'll use the default system ringtone for our incoming call notification channel.  You can
    // use your own audio resource here.
    Uri ringtoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
    channel.setSound(ringtoneUri, new AudioAttributes.Builder()
             // Setting the AudioAttributes is important as it identifies the purpose of your
             // notification sound.
             .setUsage(AudioAttributes.USAGE_NOTIFICATION_RINGTONE)
             .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
         .build());

    NotificationManager mgr = getSystemService(NotificationManager.class);
    mgr.createNotificationChannel(channel);

When it comes time to post a notification for your incoming call, ensure it uses your incoming call `https://developer.android.com/reference/android/app/NotificationChannel`.

        // Create an intent which triggers your fullscreen incoming call user interface.
        Intent intent = new Intent(Intent.ACTION_MAIN, null);
        intent.setFlags(Intent.FLAG_ACTIVITY_NO_USER_ACTION | Intent.FLAG_ACTIVITY_NEW_TASK);
        intent.setClass(context, YourIncomingCallActivity.class);
        PendingIntent pendingIntent = PendingIntent.getActivity(context, 1, intent, PendingIntent.FLAG_MUTABLE_UNAUDITED);

        // Build the notification as an ongoing high priority item; this ensures it will show as
        // a heads up notification which slides down over top of the current content.
        final Notification.Builder builder = new Notification.Builder(context);
        builder.setOngoing(true);
        builder.setPriority(Notification.PRIORITY_HIGH);

        // Set notification content intent to take user to fullscreen UI if user taps on the
        // notification body.
        builder.setContentIntent(pendingIntent);
        // Set full screen intent to trigger display of the fullscreen UI when the notification
        // manager deems it appropriate.
        builder.setFullScreenIntent(pendingIntent, true);

        // Setup notification content.
        builder.setSmallIcon( yourIconResourceId );
        builder.setContentTitle("Your notification title");
        builder.setContentText("Your notification content.");

        // Set notification as insistent to cause your ringtone to loop.
        Notification notification = builder.build();
        notification.flags |= Notification.FLAG_INSISTENT;

        // Use builder.addAction(..) to add buttons to answer or reject the call.
        NotificationManager notificationManager = mContext.getSystemService(
            NotificationManager.class);
        notificationManager.notify(YOUR_CHANNEL_ID, YOUR_TAG, YOUR_ID, notification);

<br />

<br />

### onSilence

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onSilence ()
```

Notifies this Connection of a request to silence the ringer.


The ringer may be silenced by any of the following methods:

- `https://developer.android.com/reference/android/telecom/TelecomManager#silenceRinger()`
- The user presses the volume-down button while a call is ringing.


Self-managed `https://developer.android.com/reference/android/telecom/ConnectionService` implementations should override this method in their
`https://developer.android.com/reference/android/telecom/Connection` implementation and implement logic to silence their app's ringtone. If
your app set the ringtone as part of the incoming call `https://developer.android.com/reference/android/app/Notification` (see
`https://developer.android.com/reference/android/telecom/Connection#onShowIncomingCallUi()`), it should re-post the notification now, except call
`https://developer.android.com/reference/android/app/Notification.Builder#setOnlyAlertOnce(boolean)` with `true`. This
will ensure the ringtone sound associated with your `https://developer.android.com/reference/android/app/NotificationChannel`
stops playing.

<br />

### onStartRtt

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onStartRtt (Connection.RttTextStream rttTextStream)
```

Notifies this `https://developer.android.com/reference/android/telecom/Connection` that the user has requested an RTT session.
The connection service should call `https://developer.android.com/reference/android/telecom/Connection#sendRttInitiationSuccess()` or
`https://developer.android.com/reference/android/telecom/Connection#sendRttInitiationFailure(int)` to inform Telecom of the success or failure of the
request, respectively.

<br />

| Parameters ||
|---|---|
| `rttTextStream` | `Connection.RttTextStream`: The object that should be used to send text to or receive text from the in-call app. This value cannot be `null`. <br /> |

### onStateChanged

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onStateChanged (int state)
```

Notifies this Connection of an internal state change. This method is called after the
state is changed.

<br />

| Parameters ||
|---|---|
| `state` | `int`: The new state, one of the `STATE_*` constants. <br /> |

### onStopDtmfTone

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onStopDtmfTone ()
```

Notifies this Connection of a request to stop any currently playing DTMF tones.

<br />

### onStopRtt

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onStopRtt ()
```

Notifies this `https://developer.android.com/reference/android/telecom/Connection` that it should terminate any existing RTT communication
channel. No response to Telecom is needed for this method.

<br />

### onTrackedByNonUiService

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onTrackedByNonUiService (boolean isTracked)
```

Inform this Conenection when it will or will not be tracked by an non-UI
`https://developer.android.com/reference/android/telecom/InCallService`.

<br />

| Parameters ||
|---|---|
| `isTracked` | `boolean`: Indicates whether an non-UI InCallService is currently tracking the self-managed call. <br /> |

### onTransfer

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onTransfer (Uri address, 
                boolean isConfirmationRequired)
```

Notifies this Connection of a request to transfer to a target number.

<br />

| Parameters ||
|---|---|
| `address` | `Uri`: the address to transfer this `https://developer.android.com/reference/android/telecom/Connection` to. This value cannot be `null`. <br /> |
| `isConfirmationRequired` | `boolean`: when `true`, the `https://developer.android.com/reference/android/telecom/ConnectionService` should wait until the transfer has successfully completed before disconnecting the current `https://developer.android.com/reference/android/telecom/Connection`, also known as an assured transfer. When `false`, the `https://developer.android.com/reference/android/telecom/ConnectionService` should signal the network to perform the transfer, but should immediately disconnect the call regardless of the outcome of the transfer, also known as a blind transfer. <br /> |

### onTransfer

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onTransfer (Connection toConnection)
```

Notifies this Connection of a request to start a CONSULTATIVE transfer to another Connection.

See 3GPP TS 24.629 for more details.

<br />

| Parameters ||
|---|---|
| `toConnection` | `Connection`: the `https://developer.android.com/reference/android/telecom/Connection` to transfer this call to. This value cannot be `null`. <br /> |

### onUnhold

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onUnhold ()
```

Notifies this Connection of a request to exit a hold state.

<br />

### onUsingAlternativeUi

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onUsingAlternativeUi (boolean isUsingAlternativeUi)
```

Inform this Connection when it will or will not be tracked by an `https://developer.android.com/reference/android/telecom/InCallService` which
can provide an InCall UI.
This is primarily intended for use by Connections reported by self-managed
`https://developer.android.com/reference/android/telecom/ConnectionService` which typically maintain their own UI.

<br />

| Parameters ||
|---|---|
| `isUsingAlternativeUi` | `boolean`: Indicates whether an InCallService that can provide InCall UI is currently tracking the self-managed call. <br /> |

### propertiesToString

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static String propertiesToString (int properties)
```

Renders a set of property bits (`PROPERTY_*`) as a human readable string.

<br />

| Parameters ||
|---|---|
| `properties` | `int`: A property bit field. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | A human readable string representation. <br /> |

### putExtras

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void putExtras (Bundle extras)
```

Adds some extras to this `Connection`. Existing keys are replaced and new ones are
added.


No assumptions should be made as to how an In-Call UI or service will handle these extras.
Keys should be fully qualified (e.g., com.example.MY_EXTRA) to avoid conflicts.

<br />

| Parameters ||
|---|---|
| `extras` | `Bundle`: The extras to add. This value cannot be `null`. <br /> |

### queryLocationForEmergency

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void queryLocationForEmergency (long timeoutMillis, 
                String provider, 
                Executor executor, 
                OutcomeReceiver<Location, QueryLocationException> callback)
```

Query the device's location in order to place an Emergency Call.
Only SIM call managers can call this method for Connections representing Emergency calls.
If a previous location query request is not completed, the new location query request will
be rejected and return a QueryLocationException with
`QueryLocationException#ERROR_PREVIOUS_REQUEST_EXISTS`

<br />

| Parameters ||
|---|---|
| `timeoutMillis` | `long`: long: Timeout in millis waiting for query response (MAX:5000, MIN:100). Value is between 100 and 5000 inclusive <br /> |
| `provider` | `String`: String: the location provider name, This value cannot be null. It is the caller's responsibility to select an enabled provider. The caller can use `https://developer.android.com/reference/android/location/LocationManager#getProviders(boolean)` to choose one of the enabled providers and pass it in. <br /> |
| `executor` | `Executor`: The executor of where the callback will execute. This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `callback` | `OutcomeReceiver`: The callback to notify the result of queryLocation. This value cannot be `null`. <br /> |

### removeExtras

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void removeExtras (List<String> keys)
```

Removes extras from this `Connection`.

<br />

| Parameters ||
|---|---|
| `keys` | `List`: The keys of the extras to remove. <br /> |

### removeExtras

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void removeExtras (String... keys)
```

Removes extras from this `Connection`.

<br />

| Parameters ||
|---|---|
| `keys` | `String`: The keys of the extras to remove. <br /> |

### requestBluetoothAudio

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void requestBluetoothAudio (BluetoothDevice bluetoothDevice)
```


**This method was deprecated
in API level 34.**   

Use `https://developer.android.com/reference/android/telecom/Connection#requestCallEndpointChange(android.telecom.CallEndpoint,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallEndpointException>)`
instead.

Request audio routing to a specific bluetooth device. Calling this method may result in
the device routing audio to a different bluetooth device than the one specified if the
bluetooth stack is unable to route audio to the requested device.
A list of available devices can be obtained via
`https://developer.android.com/reference/android/telecom/CallAudioState#getSupportedBluetoothDevices()`


Used by self-managed `https://developer.android.com/reference/android/telecom/ConnectionService`s which wish to use bluetooth audio for a
self-managed `https://developer.android.com/reference/android/telecom/Connection` (see `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SELF_MANAGED`.)


See also `https://developer.android.com/reference/android/telecom/InCallService#requestBluetoothAudio(android.bluetooth.BluetoothDevice)`

<br />

| Parameters ||
|---|---|
| `bluetoothDevice` | `BluetoothDevice`: The bluetooth device to connect to. This value cannot be `null`. <br /> |

### requestCallEndpointChange

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void requestCallEndpointChange (CallEndpoint endpoint, 
                Executor executor, 
                OutcomeReceiver<Void, CallEndpointException> callback)
```

Request audio routing to a specific CallEndpoint. Clients should not define their own
CallEndpoint when requesting a change. Instead, the new endpoint should be one of the valid
endpoints provided by `https://developer.android.com/reference/android/telecom/Connection#onAvailableCallEndpointsChanged(java.util.List<android.telecom.CallEndpoint>)`.
When this request is honored, there will be change to the `https://developer.android.com/reference/android/telecom/Connection#getCurrentCallEndpoint()`.


Used by self-managed `https://developer.android.com/reference/android/telecom/ConnectionService`s which wish to change the CallEndpoint for a
self-managed `https://developer.android.com/reference/android/telecom/Connection` (see `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SELF_MANAGED`.)


See also
`https://developer.android.com/reference/android/telecom/InCallService#requestCallEndpointChange(android.telecom.CallEndpoint,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallEndpointException>)`.

<br />

| Parameters ||
|---|---|
| `endpoint` | `CallEndpoint`: The call endpoint to use. This value cannot be `null`. <br /> |
| `executor` | `Executor`: The executor of where the callback will execute. This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `callback` | `OutcomeReceiver`: The callback to notify the result of the endpoint change. This value cannot be `null`. <br /> |

### sendConnectionEvent

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void sendConnectionEvent (String event, 
                Bundle extras)
```

Sends an event associated with this `Connection` with associated event extras to the
`https://developer.android.com/reference/android/telecom/InCallService`.


Connection events are used to communicate point in time information from a
`https://developer.android.com/reference/android/telecom/ConnectionService` to a `https://developer.android.com/reference/android/telecom/InCallService` implementations. An example of a
custom connection event includes notifying the UI when a WIFI call has been handed over to
LTE, which the InCall UI might use to inform the user that billing charges may apply. The
Android Telephony framework will send the `https://developer.android.com/reference/android/telecom/Connection#EVENT_CALL_MERGE_FAILED` connection event
when a call to `https://developer.android.com/reference/android/telecom/Call#mergeConference()` has failed to complete successfully. A
connection event could also be used to trigger UI in the `https://developer.android.com/reference/android/telecom/InCallService` which prompts
the user to make a choice (e.g. whether they want to incur roaming costs for making a call),
which is communicated back via `https://developer.android.com/reference/android/telecom/Call#sendCallEvent(java.lang.String,%20android.os.Bundle)`.


Events are exposed to `https://developer.android.com/reference/android/telecom/InCallService` implementations via
`https://developer.android.com/reference/android/telecom/Call.Callback#onConnectionEvent(android.telecom.Call,%20java.lang.String,%20android.os.Bundle)`.


No assumptions should be made as to how an In-Call UI or service will handle these events.
The `https://developer.android.com/reference/android/telecom/ConnectionService` must assume that the In-Call UI could even chose to ignore
some events altogether.


Events should be fully qualified (e.g. `com.example.event.MY_EVENT`) to avoid
conflicts between `https://developer.android.com/reference/android/telecom/ConnectionService` implementations. Further, custom
`https://developer.android.com/reference/android/telecom/ConnectionService` implementations shall not re-purpose events in the
`android.*` namespace, nor shall they define new event types in this namespace. When
defining a custom event type, ensure the contents of the extras `https://developer.android.com/reference/android/os/Bundle` is clearly
defined. Extra keys for this bundle should be named similar to the event type (e.g.
`com.example.extra.MY_EXTRA`).


When defining events and the associated extras, it is important to keep their behavior
consistent when the associated `https://developer.android.com/reference/android/telecom/ConnectionService` is updated. Support for deprecated
events/extras should me maintained to ensure backwards compatibility with older
`https://developer.android.com/reference/android/telecom/InCallService` implementations which were built to support the older behavior.

<br />

| Parameters ||
|---|---|
| `event` | `String`: The connection event. <br /> |
| `extras` | `Bundle`: Optional bundle containing extra information associated with the event. <br /> |

### sendRemoteRttRequest

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void sendRemoteRttRequest ()
```

Informs listeners that the remote side of the call has requested an upgrade to include an
RTT session in the call.

<br />

### sendRttInitiationFailure

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void sendRttInitiationFailure (int reason)
```

Informs listeners that a previously requested RTT session via
`https://developer.android.com/reference/android/telecom/ConnectionRequest#isRequestingRtt()` or `https://developer.android.com/reference/android/telecom/Connection#onStartRtt(android.telecom.Connection.RttTextStream)`
has failed.

<br />

| Parameters ||
|---|---|
| `reason` | `int`: One of the reason codes defined in `https://developer.android.com/reference/android/telecom/Connection.RttModifyStatus`, with the exception of `https://developer.android.com/reference/android/telecom/Connection.RttModifyStatus#SESSION_MODIFY_REQUEST_SUCCESS`. <br /> |

### sendRttInitiationSuccess

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void sendRttInitiationSuccess ()
```

Informs listeners that a previously requested RTT session via
`https://developer.android.com/reference/android/telecom/ConnectionRequest#isRequestingRtt()` or
`https://developer.android.com/reference/android/telecom/Connection#onStartRtt(android.telecom.Connection.RttTextStream)` has succeeded.

<br />

### sendRttSessionRemotelyTerminated

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void sendRttSessionRemotelyTerminated ()
```

Informs listeners that a currently active RTT session has been terminated by the remote
side of the coll.

<br />

### setActive

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setActive ()
```

Sets state to active (e.g., an ongoing connection where two or more parties can actively
communicate).

<br />

### setAddress

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setAddress (Uri address, 
                int presentation)
```

Sets the value of the `https://developer.android.com/reference/android/telecom/Connection#getAddress()` property.

<br />

| Parameters ||
|---|---|
| `address` | `Uri`: The new address. <br /> |
| `presentation` | `int`: The presentation requirements for the address. See `https://developer.android.com/reference/android/telecom/TelecomManager` for valid values. <br /> |

### setAudioModeIsVoip

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setAudioModeIsVoip (boolean isVoip)
```

Requests that the framework use VOIP audio mode for this connection.

<br />

| Parameters ||
|---|---|
| `isVoip` | `boolean`: True if the audio mode is VOIP. <br /> |

### setAudioProcessing

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setAudioProcessing (int useCase)
```

Sets state to audio processing (e.g. the call is active but the audio from the call is being
intercepted by an app on the local device) and the usecase. This is applicable only for an
`https://developer.android.com/reference/android/telecom/Connection#PROPERTY_IS_EXTERNAL_CALL`

<br />

| Parameters ||
|---|---|
| `useCase` | `int`: One of `https://developer.android.com/` for when the call is in state `https://developer.android.com/reference/android/telecom/Connection#STATE_AUDIO_PROCESSING` Value is one of the following: - `https://developer.android.com/reference/android/telecom/Call#AUDIO_PROCESSING_USE_CASE_UNKNOWN` - `https://developer.android.com/reference/android/telecom/Call#AUDIO_PROCESSING_USE_CASE_VOICEMAIL` - `https://developer.android.com/reference/android/telecom/Call#AUDIO_PROCESSING_USE_CASE_CALL_SCREENING` - `https://developer.android.com/reference/android/telecom/Call#AUDIO_PROCESSING_USE_CASE_ASK_TO_HOLD` |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if called on a non-external call. |

### setAudioRoute

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setAudioRoute (int route)
```


**This method was deprecated
in API level 34.**   

Use `https://developer.android.com/reference/android/telecom/Connection#requestCallEndpointChange(android.telecom.CallEndpoint,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallEndpointException>)`
instead.

Sets the audio route (speaker, bluetooth, etc...). When this request is honored, there will
be change to the `https://developer.android.com/reference/android/telecom/Connection#getCallAudioState()`.


Used by self-managed `https://developer.android.com/reference/android/telecom/ConnectionService`s which wish to change the audio route for a
self-managed `https://developer.android.com/reference/android/telecom/Connection` (see `https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SELF_MANAGED`.)


See also `https://developer.android.com/reference/android/telecom/InCallService#setAudioRoute(int)`.

<br />

| Parameters ||
|---|---|
| `route` | `int`: The audio route to use (one of `https://developer.android.com/reference/android/telecom/CallAudioState#ROUTE_BLUETOOTH`, `https://developer.android.com/reference/android/telecom/CallAudioState#ROUTE_EARPIECE`, `https://developer.android.com/reference/android/telecom/CallAudioState#ROUTE_SPEAKER`, or `https://developer.android.com/reference/android/telecom/CallAudioState#ROUTE_WIRED_HEADSET`). <br /> |

### setCallerDisplayName

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setCallerDisplayName (String callerDisplayName, 
                int presentation)
```

Sets the caller display name (CNAP).

<br />

| Parameters ||
|---|---|
| `callerDisplayName` | `String`: The new display name. <br /> |
| `presentation` | `int`: The presentation requirements for the handle. See `https://developer.android.com/reference/android/telecom/TelecomManager` for valid values. <br /> |

### setCallerNumberVerificationStatus

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setCallerNumberVerificationStatus (int callerNumberVerificationStatus)
```

Sets the verification status for the phone number of an incoming call as identified in
ATIS-1000082.


This property can only be set at the time of creation of a `https://developer.android.com/reference/android/telecom/Connection` being returned
by
`https://developer.android.com/reference/android/telecom/ConnectionService#onCreateIncomingConnection(android.telecom.PhoneAccountHandle,%20android.telecom.ConnectionRequest)`.

<br />

| Parameters ||
|---|---|
| `callerNumberVerificationStatus` | `int`: Value is one of the following: - `https://developer.android.com/reference/android/telecom/Connection#VERIFICATION_STATUS_NOT_VERIFIED` - `https://developer.android.com/reference/android/telecom/Connection#VERIFICATION_STATUS_PASSED` - `https://developer.android.com/reference/android/telecom/Connection#VERIFICATION_STATUS_FAILED` |

### setConferenceableConnections

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setConferenceableConnections (List<Connection> conferenceableConnections)
```

Sets the connections with which this connection can be conferenced.

<br />

| Parameters ||
|---|---|
| `conferenceableConnections` | `List`: The set of connections this connection can conference with. <br /> |

### setConferenceables

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setConferenceables (List<Conferenceable> conferenceables)
```

Similar to `https://developer.android.com/reference/android/telecom/Connection#setConferenceableConnections(java.util.List<android.telecom.Connection>)`, sets a list of connections
or conferences with which this connection can be conferenced.

<br />

| Parameters ||
|---|---|
| `conferenceables` | `List`: The conferenceables. <br /> |

### setConnectionCapabilities

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setConnectionCapabilities (int connectionCapabilities)
```

Sets the connection's capabilities as a bit mask of the `CAPABILITY_*` constants.

<br />

| Parameters ||
|---|---|
| `connectionCapabilities` | `int`: The new connection capabilities. <br /> |

### setConnectionProperties

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setConnectionProperties (int connectionProperties)
```

Sets the connection's properties as a bit mask of the `PROPERTY_*` constants.

<br />

| Parameters ||
|---|---|
| `connectionProperties` | `int`: The new connection properties. <br /> |

### setDialing

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setDialing ()
```

Sets state to dialing (e.g., dialing an outbound connection). The Connection should not be
in STATE_DIALING for more than 60 seconds. After 60 seconds, the Connection will
be disconnected.

<br />

### setDisconnected

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setDisconnected (DisconnectCause disconnectCause)
```

Sets state to disconnected.

<br />

| Parameters ||
|---|---|
| `disconnectCause` | `DisconnectCause`: The reason for the disconnection, as specified by `https://developer.android.com/reference/android/telecom/DisconnectCause`. <br /> |

### setExtras

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setExtras (Bundle extras)
```

Set some extras that can be associated with this `Connection`.


New or existing keys are replaced in the `Connection` extras. Keys which are no longer
in the new extras, but were present the last time `setExtras` was called are removed.


Alternatively you may use the `https://developer.android.com/reference/android/telecom/Connection#putExtras(android.os.Bundle)`, and
`https://developer.android.com/reference/android/telecom/Connection#removeExtras(java.lang.String[])` methods to modify the extras.


No assumptions should be made as to how an In-Call UI or service will handle these extras.
Keys should be fully qualified (e.g., com.example.MY_EXTRA) to avoid conflicts.

<br />

| Parameters ||
|---|---|
| `extras` | `Bundle`: The extras associated with this `Connection`. This value may be `null`. <br /> |

### setInitialized

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setInitialized ()
```

Sets state to initialized (the Connection has been set up and is now ready to be used).

<br />

### setInitializing

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setInitializing ()
```

Sets state to initializing (this Connection is not yet ready to be used).

<br />

### setNextPostDialChar

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setNextPostDialChar (char nextChar)
```

Informs listeners that this `Connection` has processed a character in the post-dial
started state. This is done when (a) the `Connection` is issuing a DTMF sequence;
and (b) it wishes to signal Telecom to play the corresponding DTMF tone locally.

<br />

| Parameters ||
|---|---|
| `nextChar` | `char`: The DTMF character that was just processed by the `Connection`. <br /> |

### setOnHold

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setOnHold ()
```

Sets state to be on hold.

<br />

### setPostDialWait

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setPostDialWait (String remaining)
```

Informs listeners that this `Connection` is in a post-dial wait state. This is done
when (a) the `Connection` is issuing a DTMF sequence; (b) it has encountered a "wait"
character; and (c) it wishes to inform the In-Call app that it is waiting for the end-user
to send an `https://developer.android.com/reference/android/telecom/Connection#onPostDialContinue(boolean)` signal.

<br />

| Parameters ||
|---|---|
| `remaining` | `String`: The DTMF character sequence remaining to be emitted once the `https://developer.android.com/reference/android/telecom/Connection#onPostDialContinue(boolean)` is received, including any "wait" characters that remaining sequence may contain. <br /> |

### setPulling

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setPulling ()
```

Sets state to pulling (e.g. the connection is being pulled to the local device from another
device). Only applicable for `https://developer.android.com/reference/android/telecom/Connection`s with
`https://developer.android.com/reference/android/telecom/Connection#PROPERTY_IS_EXTERNAL_CALL` and `https://developer.android.com/reference/android/telecom/Connection#CAPABILITY_CAN_PULL_CALL`.

<br />

### setRingbackRequested

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setRingbackRequested (boolean ringback)
```

Requests that the framework play a ringback tone. This is to be invoked by implementations
that do not play a ringback tone themselves in the connection's audio stream.

<br />

| Parameters ||
|---|---|
| `ringback` | `boolean`: Whether the ringback tone is to be played. <br /> |

### setRinging

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setRinging ()
```

Sets state to ringing (e.g., an inbound ringing connection). The Connection should not be
in STATE_RINGING for more than 60 seconds. After 60 seconds, the Connection will
be disconnected.

<br />

### setSimulatedRinging

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setSimulatedRinging ()
```

Sets state to simulated ringing where its presented to the user after being in
`https://developer.android.com/reference/android/telecom/Connection#STATE_AUDIO_PROCESSING`. This is applicable only for an
`https://developer.android.com/reference/android/telecom/Connection#PROPERTY_IS_EXTERNAL_CALL`

<br />

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if the call is non-external. |

### setStatusHints

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setStatusHints (StatusHints statusHints)
```

Sets the label and icon status to display in the in-call UI.

<br />

| Parameters ||
|---|---|
| `statusHints` | `StatusHints`: The status label and icon to set. <br /> |

### setVideoProvider

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setVideoProvider (Connection.VideoProvider videoProvider)
```

Sets the video connection provider.

<br />

| Parameters ||
|---|---|
| `videoProvider` | `Connection.VideoProvider`: The video provider. <br /> |

### setVideoState

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setVideoState (int videoState)
```

Set the video state for the connection.
Valid values: `https://developer.android.com/reference/android/telecom/VideoProfile#STATE_AUDIO_ONLY`,
`https://developer.android.com/reference/android/telecom/VideoProfile#STATE_BIDIRECTIONAL`,
`https://developer.android.com/reference/android/telecom/VideoProfile#STATE_TX_ENABLED`,
`https://developer.android.com/reference/android/telecom/VideoProfile#STATE_RX_ENABLED`.

<br />

| Parameters ||
|---|---|
| `videoState` | `int`: The new video state. <br /> |

### stateToString

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static String stateToString (int state)
```

<br />

<br />

| Parameters ||
|---|---|
| `state` | `int`: An integer value of a `STATE_*` constant. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | A string representation of the value. <br /> |