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

# ConnectionRequest

*** ** * ** ***


`
public

final

class
ConnectionRequest
`


`

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


`

`


implements

https://developer.android.com/reference/android/os/Parcelable


`

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

<br />

*** ** * ** ***

Simple data container encapsulating a request to some entity to
create a new `https://developer.android.com/reference/android/telecom/Connection`.

## Summary

| ### Inherited constants |
|---|
| From interface `https://developer.android.com/reference/android/os/Parcelable` |---|---| | `int` | `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor. | | `int` | `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". | |

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/telecom/ConnectionRequest>` | `https://developer.android.com/reference/android/telecom/ConnectionRequest#CREATOR` |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/telecom/ConnectionRequest#ConnectionRequest(android.telecom.PhoneAccountHandle,%20android.net.Uri,%20android.os.Bundle)(https://developer.android.com/reference/android/telecom/PhoneAccountHandle accountHandle, https://developer.android.com/reference/android/net/Uri handle, https://developer.android.com/reference/android/os/Bundle extras) ` |
| ` https://developer.android.com/reference/android/telecom/ConnectionRequest#ConnectionRequest(android.telecom.PhoneAccountHandle,%20android.net.Uri,%20android.os.Bundle,%20int)(https://developer.android.com/reference/android/telecom/PhoneAccountHandle accountHandle, https://developer.android.com/reference/android/net/Uri handle, https://developer.android.com/reference/android/os/Bundle extras, int videoState) ` |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/telecom/ConnectionRequest#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` https://developer.android.com/reference/android/telecom/PhoneAccountHandle` | ` https://developer.android.com/reference/android/telecom/ConnectionRequest#getAccountHandle()() ` The account which should be used to place the call. |
| ` https://developer.android.com/reference/android/net/Uri` | ` https://developer.android.com/reference/android/telecom/ConnectionRequest#getAddress()() ` The handle (e.g., phone number) to which the `https://developer.android.com/reference/android/telecom/Connection` is to connect. |
| ` https://developer.android.com/reference/android/os/Bundle` | ` https://developer.android.com/reference/android/telecom/ConnectionRequest#getExtras()() ` Application-specific extra data. |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/Uri>` | ` https://developer.android.com/reference/android/telecom/ConnectionRequest#getParticipants()() ` The participants to which the `https://developer.android.com/reference/android/telecom/Connection` is to connect. |
| ` https://developer.android.com/reference/android/telecom/Connection.RttTextStream` | ` https://developer.android.com/reference/android/telecom/ConnectionRequest#getRttTextStream()() ` Gets the `https://developer.android.com/reference/android/telecom/Connection.RttTextStream` object that should be used to send and receive RTT text to/from the in-call app. |
| ` int` | ` https://developer.android.com/reference/android/telecom/ConnectionRequest#getVideoState()() ` Describes the video states supported by the client requesting the connection. |
| ` boolean` | ` https://developer.android.com/reference/android/telecom/ConnectionRequest#isAdhocConferenceCall()() ` |
| ` boolean` | ` https://developer.android.com/reference/android/telecom/ConnectionRequest#isRequestingRtt()() ` Convenience method for determining whether the ConnectionRequest is requesting an RTT session |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/telecom/ConnectionRequest#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/telecom/ConnectionRequest#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel destination, int flags) ` Flatten this object in to a Parcel. |

| ### 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*. | ||
| From interface ` https://developer.android.com/reference/android/os/Parcelable ` |---|---| | ` abstract int` | ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. | | ` abstract void` | ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. | ||

## Fields

### CREATOR

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

```
public static final Creator<ConnectionRequest> CREATOR
```

<br />

<br />

## Public constructors

### ConnectionRequest

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

```
public ConnectionRequest (PhoneAccountHandle accountHandle, 
                Uri handle, 
                Bundle extras)
```

<br />

<br />

| Parameters ||
|---|---|
| `accountHandle` | `PhoneAccountHandle`: The accountHandle which should be used to place the call. <br /> |
| `handle` | `Uri`: The handle (e.g., phone number) to which the `https://developer.android.com/reference/android/telecom/Connection` is to connect. <br /> |
| `extras` | `Bundle`: Application-specific extra data. <br /> |

### ConnectionRequest

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

```
public ConnectionRequest (PhoneAccountHandle accountHandle, 
                Uri handle, 
                Bundle extras, 
                int videoState)
```

<br />

<br />

| Parameters ||
|---|---|
| `accountHandle` | `PhoneAccountHandle`: The accountHandle which should be used to place the call. <br /> |
| `handle` | `Uri`: The handle (e.g., phone number) to which the `https://developer.android.com/reference/android/telecom/Connection` is to connect. <br /> |
| `extras` | `Bundle`: Application-specific extra data. <br /> |
| `videoState` | `int`: Determines the video state for the connection. <br /> |

## Public methods

### describeContents

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

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`,
the return value of this method must include the
`https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### getAccountHandle

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

```
public PhoneAccountHandle getAccountHandle ()
```

The account which should be used to place the call.

<br />

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

### getAddress

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

```
public Uri getAddress ()
```

The handle (e.g., phone number) to which the `https://developer.android.com/reference/android/telecom/Connection` is to connect.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/net/Uri` | <br /> |

### getExtras

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

```
public Bundle getExtras ()
```

Application-specific extra data. Used for passing back information from an incoming
call `Intent`, and for any proprietary extensions arranged between a client
and servant `ConnectionService` which agree on a vocabulary for such data.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Bundle` | <br /> |

### getParticipants

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

```
public List<Uri> getParticipants ()
```

The participants to which the `https://developer.android.com/reference/android/telecom/Connection` is to connect.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/net/Uri>` | This value may be `null`. <br /> |

### getRttTextStream

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

```
public Connection.RttTextStream getRttTextStream ()
```

Gets the `https://developer.android.com/reference/android/telecom/Connection.RttTextStream` object that should be used to
send and receive RTT text to/from the in-call app.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/telecom/Connection.RttTextStream` | An instance of `https://developer.android.com/reference/android/telecom/Connection.RttTextStream`, or `null` if this connection request is not requesting an RTT session upon connection establishment. <br /> |

### getVideoState

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

```
public int getVideoState ()
```

Describes the video states supported by the client requesting 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 for the connection. <br /> |

### isAdhocConferenceCall

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

```
public boolean isAdhocConferenceCall ()
```

<br />

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the call is a adhoc conference call else @return `false` <br /> |

### isRequestingRtt

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

```
public boolean isRequestingRtt ()
```

Convenience method for determining whether the ConnectionRequest is requesting an RTT session

<br />

| Returns ||
|---|---|
| `boolean` | `true` if RTT is requested, `false` otherwise. <br /> |

### toString

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

```
public String toString ()
```

Returns a string representation of the object.

<br />

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

### writeToParcel

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

```
public void writeToParcel (Parcel destination, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

| Parameters ||
|---|---|
| `destination` | `Parcel`: The Parcel in which the object should be written. This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |