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/RemoteConnection#nestedclasses) \| [Methods](https://developer.android.com/reference/android/telecom/RemoteConnection#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/telecom/RemoteConnection#inhmethods)

# RemoteConnection

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/telecom/RemoteConnection "View this page in Kotlin") \|Java


`
public

final

class
RemoteConnection
`


`

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


`

`


`

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

<br />

*** ** * ** ***

A connection provided to a `https://developer.android.com/reference/android/telecom/ConnectionService` by another `ConnectionService`
running in a different process.
**See also:**

- `https://developer.android.com/reference/android/telecom/ConnectionService#createRemoteOutgoingConnection(android.telecom.PhoneAccountHandle,%20android.telecom.ConnectionRequest)`
- `https://developer.android.com/reference/android/telecom/ConnectionService#createRemoteIncomingConnection(android.telecom.PhoneAccountHandle,%20android.telecom.ConnectionRequest)`

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/telecom/RemoteConnection.Callback` Callback base class for `https://developer.android.com/reference/android/telecom/RemoteConnection`. |
| ` class` | `https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider` `https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider` associated with a `https://developer.android.com/reference/android/telecom/RemoteConnection`. |

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#abort()() ` Instructs this `RemoteConnection` to abort. |
| ` void` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#addConferenceParticipants(java.util.List<android.net.Uri>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/Uri> participants) ` Instructs this `https://developer.android.com/reference/android/telecom/RemoteConnection` to initiate a conference with a list of participants. |
| ` void` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#answer()() ` Instructs this `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING` `RemoteConnection` to answer. |
| ` void` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#disconnect()() ` Instructs this `RemoteConnection` to disconnect. |
| ` https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#getAddress()() ` Obtains the address of this `RemoteConnection`. |
| ` int` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#getAddressPresentation()() ` Obtains the presentation requirements for the address of this `RemoteConnection`. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#getCallerDisplayName()() ` Obtains the display name for this `RemoteConnection`'s caller. |
| ` int` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#getCallerDisplayNamePresentation()() ` Obtains the presentation requirements for this `RemoteConnection`'s caller's display name. |
| ` https://developer.android.com/reference/android/telecom/RemoteConference` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#getConference()() ` Obtain the `RemoteConference` that this `RemoteConnection` may be a part of, or `null` if there is no such `RemoteConference`. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/telecom/RemoteConnection>` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#getConferenceableConnections()() ` Obtain the `RemoteConnection`s with which this `RemoteConnection` may be successfully asked to create a conference with. |
| ` int` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#getConnectionCapabilities()() ` Obtains the capabilities of this `RemoteConnection`. |
| ` int` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#getConnectionProperties()() ` Obtains the properties of this `RemoteConnection`. |
| ` https://developer.android.com/reference/android/telecom/DisconnectCause` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#getDisconnectCause()() ` Obtains the reason why this `RemoteConnection` may have been disconnected. |
| ` https://developer.android.com/reference/android/os/Bundle` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#getExtras()() ` Obtain the extras associated with this `RemoteConnection`. |
| ` int` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#getState()() ` Obtains the state of this `RemoteConnection`. |
| ` https://developer.android.com/reference/android/telecom/StatusHints` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#getStatusHints()() ` Obtains status hints pertaining to this `RemoteConnection`. |
| ` https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#getVideoProvider()() ` Obtains the video provider of this `RemoteConnection`. |
| ` int` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#getVideoState()() ` Obtains the video state of this `RemoteConnection`. |
| ` void` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#hold()() ` Instructs this `RemoteConnection` to go on hold. |
| ` boolean` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#isRingbackRequested()() ` Determines whether this `RemoteConnection` is requesting ringback. |
| ` boolean` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#isVoipAudioMode()() ` Determines if the audio mode of this `RemoteConnection` is VOIP. |
| ` void` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#playDtmfTone(char)(char digit) ` Instructs this `RemoteConnection` to play a dual-tone multi-frequency signaling (DTMF) tone. |
| ` void` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#postDialContinue(boolean)(boolean proceed) ` Instructs this `RemoteConnection` to continue playing a post-dial DTMF string. |
| ` void` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#pullExternalCall()() ` Instructs this `https://developer.android.com/reference/android/telecom/RemoteConnection` to pull itself to the local device. |
| ` void` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#registerCallback(android.telecom.RemoteConnection.Callback)(https://developer.android.com/reference/android/telecom/RemoteConnection.Callback callback) ` Adds a callback to this `RemoteConnection`. |
| ` void` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#registerCallback(android.telecom.RemoteConnection.Callback,%20android.os.Handler)(https://developer.android.com/reference/android/telecom/RemoteConnection.Callback callback, https://developer.android.com/reference/android/os/Handler handler) ` Adds a callback to this `RemoteConnection`. |
| ` void` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#reject()() ` Instructs this `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING` `RemoteConnection` to reject. |
| ` void` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#setCallAudioState(android.telecom.CallAudioState)(https://developer.android.com/reference/android/telecom/CallAudioState state) ` Set the audio state of this `RemoteConnection`. |
| ` void` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#stopDtmfTone()() ` Instructs this `RemoteConnection` to stop any dual-tone multi-frequency signaling (DTMF) tone currently playing. |
| ` void` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#unhold()() ` Instructs this `https://developer.android.com/reference/android/telecom/Connection#STATE_HOLDING` call to release from hold. |
| ` void` | ` https://developer.android.com/reference/android/telecom/RemoteConnection#unregisterCallback(android.telecom.RemoteConnection.Callback)(https://developer.android.com/reference/android/telecom/RemoteConnection.Callback callback) ` Removes a callback from this `RemoteConnection`. |

| ### 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*. | ||

## Public methods

### abort

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

```
public void abort ()
```

Instructs this `RemoteConnection` to abort.

<br />

### addConferenceParticipants

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

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

Instructs this `https://developer.android.com/reference/android/telecom/RemoteConnection` to initiate a conference with a list of
participants.

<br />

<br />

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

### answer

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

```
public void answer ()
```

Instructs this `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING` `RemoteConnection` to answer.

<br />

### disconnect

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

```
public void disconnect ()
```

Instructs this `RemoteConnection` to disconnect.

<br />

### getAddress

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

```
public Uri getAddress ()
```

Obtains the address of this `RemoteConnection`.

<br />

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

### getAddressPresentation

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

```
public int getAddressPresentation ()
```

Obtains the presentation requirements for the address of this `RemoteConnection`.

<br />

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

### getCallerDisplayName

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

```
public CharSequence getCallerDisplayName ()
```

Obtains the display name for this `RemoteConnection`'s caller.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | The display name for the caller. <br /> |

### getCallerDisplayNamePresentation

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

```
public int getCallerDisplayNamePresentation ()
```

Obtains the presentation requirements for this `RemoteConnection`'s
caller's display name.

<br />

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

### getConference

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

```
public RemoteConference getConference ()
```

Obtain the `RemoteConference` that this `RemoteConnection` may be a part
of, or `null` if there is no such `RemoteConference`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/RemoteConference` | A `RemoteConference` or `null`; <br /> |

### getConferenceableConnections

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

```
public List<RemoteConnection> getConferenceableConnections ()
```

Obtain the `RemoteConnection`s with which this `RemoteConnection` may be
successfully asked to create a conference with.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/telecom/RemoteConnection>` | The `RemoteConnection`s with which this `RemoteConnection` may be merged into a `https://developer.android.com/reference/android/telecom/RemoteConference`. <br /> |

### getConnectionCapabilities

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

```
public int getConnectionCapabilities ()
```

Obtains the capabilities of this `RemoteConnection`.

<br />

| Returns ||
|---|---|
| `int` | A bitmask of the capabilities of the `RemoteConnection`, as defined in the `CAPABILITY_*` constants in class `https://developer.android.com/reference/android/telecom/Connection`. <br /> |

### getConnectionProperties

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

```
public int getConnectionProperties ()
```

Obtains the properties of this `RemoteConnection`.

<br />

| Returns ||
|---|---|
| `int` | A bitmask of the properties of the `RemoteConnection`, as defined in the `PROPERTY_*` constants in class `https://developer.android.com/reference/android/telecom/Connection`. <br /> |

### getDisconnectCause

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

```
public DisconnectCause getDisconnectCause ()
```

Obtains the reason why this `RemoteConnection` may have been disconnected.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/DisconnectCause` | For a `https://developer.android.com/reference/android/telecom/Connection#STATE_DISCONNECTED` `RemoteConnection`, the disconnect cause expressed as a code chosen from among those declared in `https://developer.android.com/reference/android/telecom/DisconnectCause`. <br /> |

### getExtras

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

```
public Bundle getExtras ()
```

Obtain the extras associated with this `RemoteConnection`.

<br />

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

### getState

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

```
public int getState ()
```

Obtains the state of this `RemoteConnection`.

<br />

| Returns ||
|---|---|
| `int` | A state value, chosen from the `STATE_*` constants. <br /> |

### getStatusHints

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

```
public StatusHints getStatusHints ()
```

Obtains status hints pertaining to this `RemoteConnection`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/StatusHints` | The current `https://developer.android.com/reference/android/telecom/StatusHints` of this `RemoteConnection`, or `null` if none have been set. <br /> |

### getVideoProvider

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

```
public RemoteConnection.VideoProvider getVideoProvider ()
```

Obtains the video provider of this `RemoteConnection`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider` | The video provider associated with this `RemoteConnection`. <br /> |

### getVideoState

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

```
public int getVideoState ()
```

Obtains the video state of this `RemoteConnection`.

<br />

| Returns ||
|---|---|
| `int` | The video state of the `RemoteConnection`. See `https://developer.android.com/reference/android/telecom/VideoProfile`. <br /> |

### hold

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

```
public void hold ()
```

Instructs this `RemoteConnection` to go on hold.

<br />

### isRingbackRequested

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

```
public boolean isRingbackRequested ()
```

Determines whether this `RemoteConnection` is requesting ringback.

<br />

| Returns ||
|---|---|
| `boolean` | Whether the `RemoteConnection` is requesting that the framework play a ringback tone on its behalf. <br /> |

### isVoipAudioMode

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

```
public boolean isVoipAudioMode ()
```

Determines if the audio mode of this `RemoteConnection` is VOIP.

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the `RemoteConnection`'s current audio mode is VOIP. <br /> |

### playDtmfTone

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

```
public void playDtmfTone (char digit)
```

Instructs this `RemoteConnection` to play a dual-tone multi-frequency signaling
(DTMF) tone.

Any other currently playing DTMF tone in the specified call is immediately stopped.

<br />

| Parameters ||
|---|---|
| `digit` | `char`: A character representing the DTMF digit for which to play the tone. This value must be one of `'0'` through `'9'`, `'*'` or `'#'`. <br /> |

### postDialContinue

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

```
public void postDialContinue (boolean proceed)
```

Instructs this `RemoteConnection` to continue playing a post-dial DTMF string.

A post-dial DTMF string is a string of digits following the first instance of either
`https://developer.android.com/reference/android/telecom/TelecomManager#DTMF_CHARACTER_WAIT` or `https://developer.android.com/reference/android/telecom/TelecomManager#DTMF_CHARACTER_PAUSE`.
These digits are immediately sent as DTMF tones to the recipient as soon as the
connection is made.

If the DTMF string contains a `https://developer.android.com/reference/android/telecom/TelecomManager#DTMF_CHARACTER_PAUSE` symbol, this
`RemoteConnection` will temporarily pause playing the tones for a pre-defined period
of time.

If the DTMF string contains a `https://developer.android.com/reference/android/telecom/TelecomManager#DTMF_CHARACTER_WAIT` symbol, this
`RemoteConnection` will pause playing the tones and notify callbacks via
`https://developer.android.com/reference/android/telecom/RemoteConnection.Callback#onPostDialWait(android.telecom.RemoteConnection,%20java.lang.String)`. At this point, the in-call app
should display to the user an indication of this state and an affordance to continue
the postdial sequence. When the user decides to continue the postdial sequence, the in-call
app should invoke the `https://developer.android.com/reference/android/telecom/RemoteConnection#postDialContinue(boolean)` method.

<br />

| Parameters ||
|---|---|
| `proceed` | `boolean`: Whether or not to continue with the post-dial sequence. <br /> |

### pullExternalCall

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

```
public void pullExternalCall ()
```

Instructs this `https://developer.android.com/reference/android/telecom/RemoteConnection` to pull itself to the local device.


See `https://developer.android.com/reference/android/telecom/Call#pullExternalCall()` for more information.

<br />

### registerCallback

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

```
public void registerCallback (RemoteConnection.Callback callback)
```

Adds a callback to this `RemoteConnection`.

<br />

| Parameters ||
|---|---|
| `callback` | `RemoteConnection.Callback`: A `Callback`. <br /> |

### registerCallback

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

```
public void registerCallback (RemoteConnection.Callback callback, 
                Handler handler)
```

Adds a callback to this `RemoteConnection`.

<br />

| Parameters ||
|---|---|
| `callback` | `RemoteConnection.Callback`: A `Callback`. <br /> |
| `handler` | `Handler`: A `Handler` which command and status changes will be delivered to. <br /> |

### reject

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

```
public void reject ()
```

Instructs this `https://developer.android.com/reference/android/telecom/Connection#STATE_RINGING` `RemoteConnection` to reject.

<br />

### setCallAudioState

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

```
public void setCallAudioState (CallAudioState state)
```

Set the audio state of this `RemoteConnection`.

<br />

| Parameters ||
|---|---|
| `state` | `CallAudioState`: The audio state of this `RemoteConnection`. <br /> |

### stopDtmfTone

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

```
public void stopDtmfTone ()
```

Instructs this `RemoteConnection` to stop any dual-tone multi-frequency signaling
(DTMF) tone currently playing.

DTMF tones are played by calling `https://developer.android.com/reference/android/telecom/RemoteConnection#playDtmfTone(char)`. If no DTMF tone is
currently playing, this method will do nothing.

<br />

### unhold

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

```
public void unhold ()
```

Instructs this `https://developer.android.com/reference/android/telecom/Connection#STATE_HOLDING` call to release from hold.

<br />

### unregisterCallback

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

```
public void unregisterCallback (RemoteConnection.Callback callback)
```

Removes a callback from this `RemoteConnection`.

<br />

| Parameters ||
|---|---|
| `callback` | `RemoteConnection.Callback`: A `Callback`. <br /> |