Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/telecom/CallControl#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/telecom/CallControl#inhmethods)

# CallControl

*** ** * ** ***


`
public

final

class
CallControl
`


`

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


`

`


`

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

<br />

*** ** * ** ***

CallControl provides client side control of a call. Each Call will get an individual CallControl
instance in which the client can alter the state of the associated call. Outgoing and incoming
calls should move to active (via `https://developer.android.com/reference/android/telecom/CallControl#setActive(java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallException>)` or
answered (via `https://developer.android.com/reference/android/telecom/CallControl#answer(int,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallException>)` before 60 seconds. If
the new call is not moved to active or answered before 60 seconds, the call will be disconnected.


Each method is Transactional meaning that it can succeed or fail. If a transaction succeeds,
the `https://developer.android.com/reference/android/os/OutcomeReceiver#onResult(R)` will be called by Telecom. Otherwise, the
`https://developer.android.com/reference/android/os/OutcomeReceiver#onError(E)` is called and provides a `https://developer.android.com/reference/android/telecom/CallException` that details why
the operation failed.

## Summary

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/telecom/CallControl#answer(int,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallException>)(int callType, 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/CallException> callback) ` Request Telecom answer an incoming call. |
| ` void` | ` https://developer.android.com/reference/android/telecom/CallControl#disconnect(android.telecom.DisconnectCause,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallException>)(https://developer.android.com/reference/android/telecom/DisconnectCause disconnectCause, 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/CallException> callback) ` Request Telecom disconnect the call and remove the call from telecom tracking. |
| ` https://developer.android.com/reference/android/os/ParcelUuid` | ` https://developer.android.com/reference/android/telecom/CallControl#getCallId()() ` |
| ` void` | ` https://developer.android.com/reference/android/telecom/CallControl#requestCallEndpointChange(android.telecom.CallEndpoint,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallException>)(https://developer.android.com/reference/android/telecom/CallEndpoint callEndpoint, 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/CallException> callback) ` Request a CallEndpoint change. |
| ` void` | ` https://developer.android.com/reference/android/telecom/CallControl#requestMuteState(boolean,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallException>)(boolean isMuted, 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/CallException> callback) ` Request a new mute state. |
| ` void` | ` https://developer.android.com/reference/android/telecom/CallControl#requestVideoState(int,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallException>)(int callType, 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/CallException> callback) ` Request a new video state for the ongoing call. |
| ` void` | ` https://developer.android.com/reference/android/telecom/CallControl#sendEvent(java.lang.String,%20android.os.Bundle)(https://developer.android.com/reference/java/lang/String event, https://developer.android.com/reference/android/os/Bundle extras) ` Raises an event to the `https://developer.android.com/reference/android/telecom/InCallService` implementations tracking this call via `https://developer.android.com/reference/android/telecom/Call.Callback#onConnectionEvent(android.telecom.Call,%20java.lang.String,%20android.os.Bundle)`. |
| ` void` | ` https://developer.android.com/reference/android/telecom/CallControl#setActive(java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallException>)(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/CallException> callback) ` Request Telecom set the call state to active. |
| ` void` | ` https://developer.android.com/reference/android/telecom/CallControl#setContactUri(android.net.Uri,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallException>)(https://developer.android.com/reference/android/net/Uri uri, 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/CallException> callback) ` Sets the VoIP contact URI for an ongoing call. |
| ` void` | ` https://developer.android.com/reference/android/telecom/CallControl#setGroupCallState(boolean,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallException>)(boolean isGroupCall, 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/CallException> callback) ` Sets the group call state for an ongoing call. |
| ` void` | ` https://developer.android.com/reference/android/telecom/CallControl#setInactive(java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallException>)(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/CallException> callback) ` Request Telecom set the call state to inactive. |
| ` void` | ` https://developer.android.com/reference/android/telecom/CallControl#startCallStreaming(java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallException>)(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/CallException> callback) ` Request start a call streaming session. |

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

### answer

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

```
public void answer (int callType, 
                Executor executor, 
                OutcomeReceiver<Void, CallException> callback)
```

Request Telecom answer an incoming call. For outgoing calls and calls that have been placed
on hold, use `https://developer.android.com/reference/android/telecom/CallControl#setActive(java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallException>)`.

<br />

| Parameters ||
|---|---|
| `callType` | `int`: to report to Telecom. Telecom will store CallType in the event another service/device requests it in order to continue the call on another screen. Value is one of the following: - `https://developer.android.com/reference/android/telecom/CallAttributes#AUDIO_CALL` - `https://developer.android.com/reference/android/telecom/CallAttributes#VIDEO_CALL` - `https://developer.android.com/reference/android/telecom/CallAttributes#MESSAGING` |
| `executor` | `Executor`: The `https://developer.android.com/reference/java/util/concurrent/Executor` on which the `https://developer.android.com/reference/android/os/OutcomeReceiver` callback will be called on. 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. This value cannot be `null`. <br /> |
| `callback` | `OutcomeReceiver`: that will be completed on the Telecom side that details success or failure of the requested operation. `https://developer.android.com/reference/android/os/OutcomeReceiver#onResult(R)` will be called if Telecom has successfully switched the call state to active `https://developer.android.com/reference/android/os/OutcomeReceiver#onError(E)` will be called if Telecom has failed to set the call state to active. A `https://developer.android.com/reference/android/telecom/CallException` will be passed that details why the operation failed. This value cannot be `null`. <br /> |

### disconnect

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

```
public void disconnect (DisconnectCause disconnectCause, 
                Executor executor, 
                OutcomeReceiver<Void, CallException> callback)
```

Request Telecom disconnect the call and remove the call from telecom tracking.

<br />

| Parameters ||
|---|---|
| `disconnectCause` | `DisconnectCause`: represents the cause for disconnecting the call. The only valid codes for the `https://developer.android.com/reference/android/telecom/DisconnectCause` passed in are: - `https://developer.android.com/reference/android/telecom/DisconnectCause#LOCAL` - `https://developer.android.com/reference/android/telecom/DisconnectCause#REMOTE` - `https://developer.android.com/reference/android/telecom/DisconnectCause#REJECTED` - `https://developer.android.com/reference/android/telecom/DisconnectCause#MISSED` . This value cannot be `null`. <br /> |
| `executor` | `Executor`: The `https://developer.android.com/reference/java/util/concurrent/Executor` on which the `https://developer.android.com/reference/android/os/OutcomeReceiver` callback will be called on. 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. This value cannot be `null`. <br /> |
| `callback` | `OutcomeReceiver`: That will be completed on the Telecom side that details success or failure of the requested operation. `https://developer.android.com/reference/android/os/OutcomeReceiver#onResult(R)` will be called if Telecom has successfully disconnected the call. `https://developer.android.com/reference/android/os/OutcomeReceiver#onError(E)` will be called if Telecom has failed to disconnect the call. A `https://developer.android.com/reference/android/telecom/CallException` will be passed that details why the operation failed. Note: After the call has been successfully disconnected, calling any CallControl API will result in the `https://developer.android.com/reference/android/os/OutcomeReceiver#onError(E)` with `https://developer.android.com/reference/android/telecom/CallException#CODE_CALL_IS_NOT_BEING_TRACKED`. This value cannot be `null`. |

### getCallId

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

```
public ParcelUuid getCallId ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/ParcelUuid` | the callId Telecom assigned to this CallControl object which should be attached to an individual call. This value cannot be `null`. <br /> |

### requestCallEndpointChange

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

```
public void requestCallEndpointChange (CallEndpoint callEndpoint, 
                Executor executor, 
                OutcomeReceiver<Void, CallException> callback)
```

Request a CallEndpoint change. 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/CallEventCallback#onAvailableCallEndpointsChanged(java.util.List<android.telecom.CallEndpoint>)`.

<br />

| Parameters ||
|---|---|
| `callEndpoint` | `CallEndpoint`: The `https://developer.android.com/reference/android/telecom/CallEndpoint` to change to. This value cannot be `null`. <br /> |
| `executor` | `Executor`: The `https://developer.android.com/reference/java/util/concurrent/Executor` on which the `https://developer.android.com/reference/android/os/OutcomeReceiver` callback will be called on. 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. This value cannot be `null`. <br /> |
| `callback` | `OutcomeReceiver`: The `https://developer.android.com/reference/android/os/OutcomeReceiver` that will be completed on the Telecom side that details success or failure of the requested operation. `https://developer.android.com/reference/android/os/OutcomeReceiver#onResult(R)` will be called if Telecom has successfully changed the CallEndpoint that was requested. `https://developer.android.com/reference/android/os/OutcomeReceiver#onError(E)` will be called if Telecom has failed to switch to the requested CallEndpoint. A `https://developer.android.com/reference/android/telecom/CallException` will be passed that details why the operation failed. This value cannot be `null`. <br /> |

### requestMuteState

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

```
public void requestMuteState (boolean isMuted, 
                Executor executor, 
                OutcomeReceiver<Void, CallException> callback)
```

Request a new mute state. Note: `https://developer.android.com/reference/android/telecom/CallEventCallback#onMuteStateChanged(boolean)`
will be called every time the mute state is changed and can be used to track the current
mute state.

<br />

| Parameters ||
|---|---|
| `isMuted` | `boolean`: The new mute state. Passing in a `https://developer.android.com/reference/java/lang/Boolean#TRUE` for the isMuted parameter will mute the call. `https://developer.android.com/reference/java/lang/Boolean#FALSE` will unmute the call. <br /> |
| `executor` | `Executor`: The `https://developer.android.com/reference/java/util/concurrent/Executor` on which the `https://developer.android.com/reference/android/os/OutcomeReceiver` callback will be called on. 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. This value cannot be `null`. <br /> |
| `callback` | `OutcomeReceiver`: The `https://developer.android.com/reference/android/os/OutcomeReceiver` that will be completed on the Telecom side that details success or failure of the requested operation. `https://developer.android.com/reference/android/os/OutcomeReceiver#onResult(R)` will be called if Telecom has successfully changed the mute state. `https://developer.android.com/reference/android/os/OutcomeReceiver#onError(E)` will be called if Telecom has failed to switch to the mute state. A `https://developer.android.com/reference/android/telecom/CallException` will be passed that details why the operation failed. This value cannot be `null`. <br /> |

### requestVideoState

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

```
public void requestVideoState (int callType, 
                Executor executor, 
                OutcomeReceiver<Void, CallException> callback)
```

Request a new video state for the ongoing call. This can only be changed if the application
has registered a `https://developer.android.com/reference/android/telecom/PhoneAccount` with the
`https://developer.android.com/reference/android/telecom/PhoneAccount#CAPABILITY_SUPPORTS_VIDEO_CALLING` and set the
`https://developer.android.com/reference/android/telecom/CallAttributes#SUPPORTS_VIDEO_CALLING` when adding the call via
`https://developer.android.com/reference/android/telecom/TelecomManager#addCall(android.telecom.CallAttributes,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<android.telecom.CallControl,android.telecom.CallException>,%20android.telecom.CallControlCallback,%20android.telecom.CallEventCallback)`

<br />

| Parameters ||
|---|---|
| `callType` | `int`: to report to Telecom. To see the valid argument to pass, see `https://developer.android.com/`. Value is one of the following: - `https://developer.android.com/reference/android/telecom/CallAttributes#AUDIO_CALL` - `https://developer.android.com/reference/android/telecom/CallAttributes#VIDEO_CALL` - `https://developer.android.com/reference/android/telecom/CallAttributes#MESSAGING` |
| `executor` | `Executor`: The `https://developer.android.com/reference/java/util/concurrent/Executor` on which the `https://developer.android.com/reference/android/os/OutcomeReceiver` callback will be called on. 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. This value cannot be `null`. <br /> |
| `callback` | `OutcomeReceiver`: that will be completed on the Telecom side that details success or failure of the requested operation. `https://developer.android.com/reference/android/os/OutcomeReceiver#onResult(R)` will be called if Telecom has successfully switched the video state. `https://developer.android.com/reference/android/os/OutcomeReceiver#onError(E)` will be called if Telecom has failed to set the new video state. A `https://developer.android.com/reference/android/telecom/CallException` will be passed that details why the operation failed. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the argument passed for videoState is invalid. To see a list of valid states, see `https://developer.android.com/`. |

### sendEvent

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

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

Raises an event to the `https://developer.android.com/reference/android/telecom/InCallService` implementations tracking this
call via `https://developer.android.com/reference/android/telecom/Call.Callback#onConnectionEvent(android.telecom.Call,%20java.lang.String,%20android.os.Bundle)`.
These events and the associated extra keys for the `Bundle` parameter are mutually
defined by a VoIP application and `https://developer.android.com/reference/android/telecom/InCallService`. This API is used to
relay additional information about a call other than what is specified in the
`https://developer.android.com/reference/android/telecom/CallAttributes` to `https://developer.android.com/reference/android/telecom/InCallService`s. This might
include, for example, a change to the list of participants in a meeting, or the name of the
speakers who have their hand raised. Where appropriate, the `https://developer.android.com/reference/android/telecom/InCallService`s tracking
this call may choose to render this additional information about the call. An automotive
calling UX, for example may have enough screen real estate to indicate the number of
participants in a meeting, but to prevent distractions could suppress the list of
participants.

<br />

| Parameters ||
|---|---|
| `event` | `String`: a string event identifier agreed upon between a VoIP application and an `https://developer.android.com/reference/android/telecom/InCallService` This value cannot be `null`. <br /> |
| `extras` | `Bundle`: a `https://developer.android.com/reference/android/os/Bundle` containing information about the event, as agreed upon between a VoIP application and `https://developer.android.com/reference/android/telecom/InCallService`. This value cannot be `null`. <br /> |

### setActive

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

```
public void setActive (Executor executor, 
                OutcomeReceiver<Void, CallException> callback)
```

Request Telecom set the call state to active. This method should be called when either an
outgoing call is ready to go active or a held call is ready to go active again. For incoming
calls that are ready to be answered, use
`https://developer.android.com/reference/android/telecom/CallControl#answer(int,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallException>)`.

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: The `https://developer.android.com/reference/java/util/concurrent/Executor` on which the `https://developer.android.com/reference/android/os/OutcomeReceiver` callback will be called on. 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. This value cannot be `null`. <br /> |
| `callback` | `OutcomeReceiver`: that will be completed on the Telecom side that details success or failure of the requested operation. `https://developer.android.com/reference/android/os/OutcomeReceiver#onResult(R)` will be called if Telecom has successfully switched the call state to active `https://developer.android.com/reference/android/os/OutcomeReceiver#onError(E)` will be called if Telecom has failed to set the call state to active. A `https://developer.android.com/reference/android/telecom/CallException` will be passed that details why the operation failed. This value cannot be `null`. <br /> |

### setContactUri

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

```
public void setContactUri (Uri uri, 
                Executor executor, 
                OutcomeReceiver<Void, CallException> callback)
```

Sets the VoIP contact URI for an ongoing call.

This method should be invoked by a VoIP application.
when a call transitions to or from being a group call. For instance, if a one-on-one
call adds more participants and becomes a conference. This should be used in par with
`https://developer.android.com/reference/android/telecom/CallControl#setGroupCallState(boolean,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver<java.lang.Void,android.telecom.CallException>)`.

Providing this state allows the Android system to correctly represent the call in the
system's user interface, such as the native call log. As part of the integrated call logs
feature, which provides a unified history for both carrier and VoIP calls, accurately
associating the calls with a valid lookup URI is essential for a consistent user experience.

The `uri` parameter is crucial for linking the call to a specific group entity
within the VoIP contact directory or a CP2 contact. This helps in associating the call log
entry with the correct contact information, such as the group's name and avatar.

<br />

| Parameters ||
|---|---|
| `uri` | `Uri`: The content URI of the contact or group in the VoIP application's contact directory or a valid CP2 contact. This URI must be stable and resolvable by the system or null if unused. <br /> |
| `executor` | `Executor`: The `https://developer.android.com/reference/java/util/concurrent/Executor` on which the `https://developer.android.com/reference/android/os/OutcomeReceiver` callback will be called on. 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. This value cannot be `null`. <br /> |
| `callback` | `OutcomeReceiver`: that will be completed on the Telecom side that details success or failure of the requested operation. `https://developer.android.com/reference/android/os/OutcomeReceiver#onResult(R)` will be called if Telecom has successfully switched the video state. `https://developer.android.com/reference/android/os/OutcomeReceiver#onError(E)` will be called if Telecom has failed to set the new video state. A `https://developer.android.com/reference/android/telecom/CallException` will be passed that details why the operation failed. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the provided `uri` is invalid or improperly formatted. |

### setGroupCallState

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

```
public void setGroupCallState (boolean isGroupCall, 
                Executor executor, 
                OutcomeReceiver<Void, CallException> callback)
```

Sets the group call state for an ongoing call.

This method should be invoked by a VoIP application.
when a call transitions to or from being a group call. For instance, if a one-on-one
call adds more participants and becomes a conference, this method informs the system of that
change.

Providing this state allows the Android system to correctly represent the call in the
system's user interface, such as the native call log. As part of the integrated call logs
feature, which provides a unified history for both carrier and VoIP calls, accurately
identifying group calls is essential for a consistent user experience.

<br />

| Parameters ||
|---|---|
| `isGroupCall` | `boolean`: `true` if the call is currently a group call, `false` otherwise. <br /> |
| `executor` | `Executor`: The `https://developer.android.com/reference/java/util/concurrent/Executor` on which the `https://developer.android.com/reference/android/os/OutcomeReceiver` callback will be called on. 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. This value cannot be `null`. <br /> |
| `callback` | `OutcomeReceiver`: that will be completed on the Telecom side that details success or failure of the requested operation. `https://developer.android.com/reference/android/os/OutcomeReceiver#onResult(R)` will be called if Telecom has successfully switched the video state. `https://developer.android.com/reference/android/os/OutcomeReceiver#onError(E)` will be called if Telecom has failed to set the new video state. A `https://developer.android.com/reference/android/telecom/CallException` will be passed that details why the operation failed. This value cannot be `null`. <br /> |

### setInactive

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

```
public void setInactive (Executor executor, 
                OutcomeReceiver<Void, CallException> callback)
```

Request Telecom set the call state to inactive. This the same as hold for two call endpoints
but can be extended to setting a meeting to inactive.

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: The `https://developer.android.com/reference/java/util/concurrent/Executor` on which the `https://developer.android.com/reference/android/os/OutcomeReceiver` callback will be called on. 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. This value cannot be `null`. <br /> |
| `callback` | `OutcomeReceiver`: that will be completed on the Telecom side that details success or failure of the requested operation. `https://developer.android.com/reference/android/os/OutcomeReceiver#onResult(R)` will be called if Telecom has successfully switched the call state to inactive `https://developer.android.com/reference/android/os/OutcomeReceiver#onError(E)` will be called if Telecom has failed to set the call state to inactive. A `https://developer.android.com/reference/android/telecom/CallException` will be passed that details why the operation failed. This value cannot be `null`. <br /> |

### startCallStreaming

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

```
public void startCallStreaming (Executor executor, 
                OutcomeReceiver<Void, CallException> callback)
```

Request start a call streaming session. On receiving valid request, telecom will bind to
the `CallStreamingService` implemented by a general call streaming sender. So that the
call streaming sender can perform streaming local device audio to another remote device and
control the call during streaming.

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: The `https://developer.android.com/reference/java/util/concurrent/Executor` on which the `https://developer.android.com/reference/android/os/OutcomeReceiver` callback will be called on. 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. This value cannot be `null`. <br /> |
| `callback` | `OutcomeReceiver`: that will be completed on the Telecom side that details success or failure of the requested operation. `https://developer.android.com/reference/android/os/OutcomeReceiver#onResult(R)` will be called if Telecom has successfully started the call streaming. `https://developer.android.com/reference/android/os/OutcomeReceiver#onError(E)` will be called if Telecom has failed to start the call streaming. A `https://developer.android.com/reference/android/telecom/CallException` will be passed that details why the operation failed. This value cannot be `null`. <br /> |