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

# VideoProvider

*** ** * ** ***

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

```
abstract class VideoProvider
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.telecom.Connection.VideoProvider](https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#) |

Provides a means of controlling the video session associated with a `https://developer.android.com/reference/kotlin/android/telecom/Connection`.

Implementations create a custom subclass of `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` and the `https://developer.android.com/reference/kotlin/android/telecom/ConnectionService` creates an instance sets it on the `https://developer.android.com/reference/kotlin/android/telecom/Connection` using `https://developer.android.com/reference/kotlin/android/telecom/Connection#setVideoProvider(android.telecom.Connection.VideoProvider)`. Any connection which supports video should set the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#`.

The `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` serves two primary purposes: it provides a means for Telecom and `https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations to issue requests related to the video session; it provides a means for the `https://developer.android.com/reference/kotlin/android/telecom/ConnectionService` to report events and information related to the video session to Telecom and the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations.

`https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations interact with the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall`.

## Summary

| Constants ||
|---|---|
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_CAMERA_FAILURE:kotlin.Int` A camera failure has occurred for the selected camera. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_CAMERA_PERMISSION_ERROR:kotlin.Int` Session event raised by Telecom when `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#setCamera(kotlin.String)` is called and the caller does not have the necessary `https://developer.android.com/reference/kotlin/android/Manifest.permission.html#CAMERA:kotlin.String` permission. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_CAMERA_READY:kotlin.Int` Issued after `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_CAMERA_FAILURE:kotlin.Int` when the camera is once again ready for operation. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_RX_PAUSE:kotlin.Int` Video is not being received (no protocol pause was issued). |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_RX_RESUME:kotlin.Int` Video reception has resumed after a `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_RX_PAUSE:kotlin.Int`. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_TX_START:kotlin.Int` Video transmission has begun. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_TX_STOP:kotlin.Int` Video transmission has stopped. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_MODIFY_REQUEST_FAIL:kotlin.Int` Session modify request failed. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_MODIFY_REQUEST_INVALID:kotlin.Int` Session modify request ignored due to invalid parameters. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_MODIFY_REQUEST_REJECTED_BY_REMOTE:kotlin.Int` Session modify request rejected by remote user. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_MODIFY_REQUEST_SUCCESS:kotlin.Int` Session modify request was successful. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_MODIFY_REQUEST_TIMED_OUT:kotlin.Int` Session modify request timed out. |

| Public constructors ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#VideoProvider()()` <br /> |

| Public methods ||
|---|---|
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#changeCameraCapabilities(android.telecom.VideoProfile.CameraCapabilities)(cameraCapabilities: https://developer.android.com/reference/kotlin/android/telecom/VideoProfile.CameraCapabilities!)` Used to inform listening `https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations when the capabilities of the current camera have changed. |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#changePeerDimensions(kotlin.Int,%20kotlin.Int)(width: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html, height: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Used to inform listening `https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations when the dimensions of the peer's video have changed. |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#changeVideoQuality(kotlin.Int)(videoQuality: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Used to inform listening `https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations when the video quality of the call has changed. |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#handleCallSessionEvent(kotlin.Int)(event: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Used to inform listening `https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations when the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` reports a call session event. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onRequestCameraCapabilities()()` Issues a request to the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` to retrieve the camera capabilities. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onRequestConnectionDataUsage()()` Issues a request to the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` to retrieve the current data usage for the video component of the current `https://developer.android.com/reference/kotlin/android/telecom/Connection`. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSendSessionModifyRequest(android.telecom.VideoProfile,%20android.telecom.VideoProfile)(fromProfile: https://developer.android.com/reference/kotlin/android/telecom/VideoProfile!, toProfile: https://developer.android.com/reference/kotlin/android/telecom/VideoProfile!)` Issues a request to modify the properties of the current video session. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSendSessionModifyResponse(android.telecom.VideoProfile)(responseProfile: https://developer.android.com/reference/kotlin/android/telecom/VideoProfile!)` Provides a response to a request to change the current video session properties. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSetCamera(kotlin.String)(cameraId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html!)` Sets the camera to be used for the outgoing video. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSetDeviceOrientation(kotlin.Int)(rotation: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Sets the device orientation, in degrees. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSetDisplaySurface(android.view.Surface)(surface: https://developer.android.com/reference/kotlin/android/view/Surface.html#!)` Sets the surface to be used for displaying the video received from the remote device. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSetPauseImage(android.net.Uri)(uri: https://developer.android.com/reference/kotlin/android/net/Uri.html#!)` Provides the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` with the `https://developer.android.com/reference/kotlin/android/net/Uri.html#` of an image to be displayed to the peer device when the video signal is paused. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSetPreviewSurface(android.view.Surface)(surface: https://developer.android.com/reference/kotlin/android/view/Surface.html#!)` Sets the surface to be used for displaying a preview of what the user's camera is currently capturing. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSetZoom(kotlin.Float)(value: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)` Sets the camera zoom ratio. |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#receiveSessionModifyRequest(android.telecom.VideoProfile)(videoProfile: https://developer.android.com/reference/kotlin/android/telecom/VideoProfile!)` Used to inform listening `https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations when the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` receives a session modification request. |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#receiveSessionModifyResponse(kotlin.Int,%20android.telecom.VideoProfile,%20android.telecom.VideoProfile)(status: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html, requestedProfile: https://developer.android.com/reference/kotlin/android/telecom/VideoProfile!, responseProfile: https://developer.android.com/reference/kotlin/android/telecom/VideoProfile!)` Used to inform listening `https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations when the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` receives a response to a session modification request. |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#setCallDataUsage(kotlin.Long)(dataUsage: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` Used to inform listening `https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations when the data usage of the video associated with the current `https://developer.android.com/reference/kotlin/android/telecom/Connection` has changed. |

## Constants

### SESSION_EVENT_CAMERA_FAILURE

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

```
static val SESSION_EVENT_CAMERA_FAILURE: Int
```

A camera failure has occurred for the selected camera. The `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` can use this as a cue to inform the user the camera is not available.

    Value: 5

**See Also**

- `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#handleCallSessionEvent(kotlin.Int)`

### SESSION_EVENT_CAMERA_PERMISSION_ERROR

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

```
static val SESSION_EVENT_CAMERA_PERMISSION_ERROR: Int
```

Session event raised by Telecom when `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#setCamera(kotlin.String)` is called and the caller does not have the necessary `https://developer.android.com/reference/kotlin/android/Manifest.permission.html#CAMERA:kotlin.String` permission.

    Value: 7

**See Also**

- `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#handleCallSessionEvent(kotlin.Int)`

### SESSION_EVENT_CAMERA_READY

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

```
static val SESSION_EVENT_CAMERA_READY: Int
```

Issued after `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_CAMERA_FAILURE:kotlin.Int` when the camera is once again ready for operation. The `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` can use this as a cue to inform the user that the camera has become available again.

    Value: 6

**See Also**

- `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#handleCallSessionEvent(kotlin.Int)`

### SESSION_EVENT_RX_PAUSE

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

```
static val SESSION_EVENT_RX_PAUSE: Int
```

Video is not being received (no protocol pause was issued).

    Value: 1

**See Also**

- `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#handleCallSessionEvent(kotlin.Int)`

### SESSION_EVENT_RX_RESUME

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

```
static val SESSION_EVENT_RX_RESUME: Int
```

Video reception has resumed after a `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_RX_PAUSE:kotlin.Int`.

    Value: 2

**See Also**

- `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#handleCallSessionEvent(kotlin.Int)`

### SESSION_EVENT_TX_START

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

```
static val SESSION_EVENT_TX_START: Int
```

Video transmission has begun. This occurs after a negotiated start of video transmission when the underlying protocol has actually begun transmitting video to the remote party.

    Value: 3

**See Also**

- `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#handleCallSessionEvent(kotlin.Int)`

### SESSION_EVENT_TX_STOP

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

```
static val SESSION_EVENT_TX_STOP: Int
```

Video transmission has stopped. This occurs after a negotiated stop of video transmission when the underlying protocol has actually stopped transmitting video to the remote party.

    Value: 4

**See Also**

- `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#handleCallSessionEvent(kotlin.Int)`

### SESSION_MODIFY_REQUEST_FAIL

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

```
static val SESSION_MODIFY_REQUEST_FAIL: Int
```

Session modify request failed.

    Value: 2

**See Also**

- `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#receiveSessionModifyResponse(kotlin.Int,%20android.telecom.VideoProfile,%20android.telecom.VideoProfile)`

### SESSION_MODIFY_REQUEST_INVALID

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

```
static val SESSION_MODIFY_REQUEST_INVALID: Int
```

Session modify request ignored due to invalid parameters.

    Value: 3

**See Also**

- `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#receiveSessionModifyResponse(kotlin.Int,%20android.telecom.VideoProfile,%20android.telecom.VideoProfile)`

### SESSION_MODIFY_REQUEST_REJECTED_BY_REMOTE

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

```
static val SESSION_MODIFY_REQUEST_REJECTED_BY_REMOTE: Int
```

Session modify request rejected by remote user.

    Value: 5

**See Also**

- `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#receiveSessionModifyResponse(kotlin.Int,%20android.telecom.VideoProfile,%20android.telecom.VideoProfile)`

### SESSION_MODIFY_REQUEST_SUCCESS

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

```
static val SESSION_MODIFY_REQUEST_SUCCESS: Int
```

Session modify request was successful.

    Value: 1

**See Also**

- `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#receiveSessionModifyResponse(kotlin.Int,%20android.telecom.VideoProfile,%20android.telecom.VideoProfile)`

### SESSION_MODIFY_REQUEST_TIMED_OUT

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

```
static val SESSION_MODIFY_REQUEST_TIMED_OUT: Int
```

Session modify request timed out.

    Value: 4

**See Also**

- `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#receiveSessionModifyResponse(kotlin.Int,%20android.telecom.VideoProfile,%20android.telecom.VideoProfile)`

## Public constructors

### VideoProvider

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

```
VideoProvider()
```

## Public methods

### changeCameraCapabilities

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

```
open fun changeCameraCapabilities(cameraCapabilities: VideoProfile.CameraCapabilities!): Unit
```

Used to inform listening `https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations when the capabilities of the current camera have changed.

The `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` should call this in response to `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onRequestCameraCapabilities()`, or when the current camera is changed via `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSetCamera(kotlin.String)`.

Received by the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback#onCameraCapabilitiesChanged(android.telecom.VideoProfile.CameraCapabilities)`.

| Parameters ||
|---|---|
| `cameraCapabilities` | [VideoProfile.CameraCapabilities](https://developer.android.com/reference/kotlin/android/telecom/VideoProfile.CameraCapabilities)!: The new camera capabilities. |

### changePeerDimensions

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

```
open fun changePeerDimensions(
    width: Int, 
    height: Int
): Unit
```

Used to inform listening `https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations when the dimensions of the peer's video have changed.

This could occur if, for example, the peer rotates their device, changing the aspect ratio of the video, or if the user switches between the back and front cameras.

Received by the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback#onPeerDimensionsChanged(kotlin.Int,%20kotlin.Int)`.

| Parameters ||
|---|---|
| `width` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The updated peer video width. |
| `height` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The updated peer video height. |

### changeVideoQuality

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

```
open fun changeVideoQuality(videoQuality: Int): Unit
```

Used to inform listening `https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations when the video quality of the call has changed.

Received by the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback#onVideoQualityChanged(kotlin.Int)`.

| Parameters ||
|---|---|
| `videoQuality` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The updated video quality. Valid values: `https://developer.android.com/reference/kotlin/android/telecom/VideoProfile#QUALITY_HIGH:kotlin.Int`, `https://developer.android.com/reference/kotlin/android/telecom/VideoProfile#QUALITY_MEDIUM:kotlin.Int`, `https://developer.android.com/reference/kotlin/android/telecom/VideoProfile#QUALITY_LOW:kotlin.Int`, `https://developer.android.com/reference/kotlin/android/telecom/VideoProfile#QUALITY_DEFAULT:kotlin.Int`. |

### handleCallSessionEvent

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

```
open fun handleCallSessionEvent(event: Int): Unit
```

Used to inform listening `https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations when the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` reports a call session event.

Received by the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback#onCallSessionEvent(kotlin.Int)`.

| Parameters ||
|---|---|
| `event` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The event. Valid values are: `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_RX_PAUSE:kotlin.Int`, `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_RX_RESUME:kotlin.Int`, `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_TX_START:kotlin.Int`, `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_TX_STOP:kotlin.Int`, `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_CAMERA_FAILURE:kotlin.Int`, `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_CAMERA_READY:kotlin.Int`, `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_EVENT_CAMERA_FAILURE:kotlin.Int`. |

### onRequestCameraCapabilities

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

```
abstract fun onRequestCameraCapabilities(): Unit
```

Issues a request to the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` to retrieve the camera capabilities.

The `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` should respond by communicating the capabilities of the chosen camera via `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#changeCameraCapabilities(android.telecom.VideoProfile.CameraCapabilities)`.

Sent from the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#requestCameraCapabilities()`.

### onRequestConnectionDataUsage

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

```
abstract fun onRequestConnectionDataUsage(): Unit
```

Issues a request to the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` to retrieve the current data usage for the video component of the current `https://developer.android.com/reference/kotlin/android/telecom/Connection`.

The `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` should respond by communicating current data usage, in bytes, via `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#setCallDataUsage(kotlin.Long)`.

Sent from the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#requestCallDataUsage()`.

### onSendSessionModifyRequest

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

```
abstract fun onSendSessionModifyRequest(
    fromProfile: VideoProfile!, 
    toProfile: VideoProfile!
): Unit
```

Issues a request to modify the properties of the current video session.

Example scenarios include: requesting an audio-only call to be upgraded to a bi-directional video call, turning on or off the user's camera, sending a pause signal when the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` is no longer the foreground application.

If the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` determines a request to be invalid, it should call `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#receiveSessionModifyResponse(kotlin.Int,%20android.telecom.VideoProfile,%20android.telecom.VideoProfile)` to report the invalid request back to the `https://developer.android.com/reference/kotlin/android/telecom/InCallService`.

Where a request requires confirmation from the user of the peer device, the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` must communicate the request to the peer device and handle the user's response. `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#receiveSessionModifyResponse(kotlin.Int,%20android.telecom.VideoProfile,%20android.telecom.VideoProfile)` is used to inform the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` of the result of the request.

Sent from the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#sendSessionModifyRequest(android.telecom.VideoProfile)`.

| Parameters ||
|---|---|
| `fromProfile` | [VideoProfile](https://developer.android.com/reference/kotlin/android/telecom/VideoProfile)!: The video profile prior to the request. |
| `toProfile` | [VideoProfile](https://developer.android.com/reference/kotlin/android/telecom/VideoProfile)!: The video profile with the requested changes made. |

### onSendSessionModifyResponse

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

```
abstract fun onSendSessionModifyResponse(responseProfile: VideoProfile!): Unit
```

Provides a response to a request to change the current video session properties.

For example, if the peer requests and upgrade from an audio-only call to a bi-directional video call, could decline the request and keep the call as audio-only. In such a scenario, the `responseProfile` would have a video state of `https://developer.android.com/reference/kotlin/android/telecom/VideoProfile#STATE_AUDIO_ONLY:kotlin.Int`. If the user had decided to accept the request, the video state would be `https://developer.android.com/reference/kotlin/android/telecom/VideoProfile#STATE_BIDIRECTIONAL:kotlin.Int`.

Sent from the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#sendSessionModifyResponse(android.telecom.VideoProfile)` in response to a `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback#onSessionModifyRequestReceived(android.telecom.VideoProfile)` callback.

| Parameters ||
|---|---|
| `responseProfile` | [VideoProfile](https://developer.android.com/reference/kotlin/android/telecom/VideoProfile)!: The response video profile. |

### onSetCamera

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

```
abstract fun onSetCamera(cameraId: String!): Unit
```

Sets the camera to be used for the outgoing video.

The `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` should respond by communicating the capabilities of the chosen camera via `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#changeCameraCapabilities(android.telecom.VideoProfile.CameraCapabilities)`.

Sent from the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#setCamera(kotlin.String)`.

| Parameters ||
|---|---|
| `cameraId` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: The id of the camera (use ids as reported by `https://developer.android.com/reference/kotlin/android/hardware/camera2/CameraManager.html#getCameraIdList()`). |

### onSetDeviceOrientation

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

```
abstract fun onSetDeviceOrientation(rotation: Int): Unit
```

Sets the device orientation, in degrees. Assumes that a standard portrait orientation of the device is 0 degrees.

Sent from the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#setDeviceOrientation(kotlin.Int)`.

| Parameters ||
|---|---|
| `rotation` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The device orientation, in degrees. |

### onSetDisplaySurface

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

```
abstract fun onSetDisplaySurface(surface: Surface!): Unit
```

Sets the surface to be used for displaying the video received from the remote device.

Sent from the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#setDisplaySurface(android.view.Surface)`.

| Parameters ||
|---|---|
| `surface` | [Surface](https://developer.android.com/reference/kotlin/android/view/Surface.html#)!: The `https://developer.android.com/reference/kotlin/android/view/Surface.html#`. |

### onSetPauseImage

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

```
abstract fun onSetPauseImage(uri: Uri!): Unit
```

Provides the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` with the `https://developer.android.com/reference/kotlin/android/net/Uri.html#` of an image to be displayed to the peer device when the video signal is paused.

Sent from the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#setPauseImage(android.net.Uri)`.

| Parameters ||
|---|---|
| `uri` | [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)!: URI of image to display. |

### onSetPreviewSurface

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

```
abstract fun onSetPreviewSurface(surface: Surface!): Unit
```

Sets the surface to be used for displaying a preview of what the user's camera is currently capturing. When video transmission is enabled, this is the video signal which is sent to the remote device.

Sent from the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#setPreviewSurface(android.view.Surface)`.

| Parameters ||
|---|---|
| `surface` | [Surface](https://developer.android.com/reference/kotlin/android/view/Surface.html#)!: The `https://developer.android.com/reference/kotlin/android/view/Surface.html#`. |

### onSetZoom

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

```
abstract fun onSetZoom(value: Float): Unit
```

Sets the camera zoom ratio.

Sent from the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#setZoom(kotlin.Float)`.

| Parameters ||
|---|---|
| `value` | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html): The camera zoom ratio; for the current camera, should be a value in the range defined by `https://developer.android.com/reference/kotlin/android/hardware/camera2/CameraCharacteristics.html#CONTROL_ZOOM_RATIO_RANGE:android.hardware.camera2.CameraCharacteristics.Key`. |

### receiveSessionModifyRequest

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

```
open fun receiveSessionModifyRequest(videoProfile: VideoProfile!): Unit
```

Used to inform listening `https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations when the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` receives a session modification request.

Received by the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback#onSessionModifyRequestReceived(android.telecom.VideoProfile)`,

| Parameters ||
|---|---|
| `videoProfile` | [VideoProfile](https://developer.android.com/reference/kotlin/android/telecom/VideoProfile)!: The requested video profile. |

**See Also**

- `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSendSessionModifyRequest(android.telecom.VideoProfile,%20android.telecom.VideoProfile)`

### receiveSessionModifyResponse

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

```
open fun receiveSessionModifyResponse(
    status: Int, 
    requestedProfile: VideoProfile!, 
    responseProfile: VideoProfile!
): Unit
```

Used to inform listening `https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations when the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#` receives a response to a session modification request.

Received by the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback#onSessionModifyResponseReceived(kotlin.Int,%20android.telecom.VideoProfile,%20android.telecom.VideoProfile)`.

| Parameters ||
|---|---|
| `status` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Status of the session modify request. Valid values are `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_MODIFY_REQUEST_SUCCESS:kotlin.Int`, `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_MODIFY_REQUEST_FAIL:kotlin.Int`, `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_MODIFY_REQUEST_INVALID:kotlin.Int`, `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_MODIFY_REQUEST_TIMED_OUT:kotlin.Int`, `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#SESSION_MODIFY_REQUEST_REJECTED_BY_REMOTE:kotlin.Int` |
| `requestedProfile` | [VideoProfile](https://developer.android.com/reference/kotlin/android/telecom/VideoProfile)!: The original request which was sent to the peer device. |
| `responseProfile` | [VideoProfile](https://developer.android.com/reference/kotlin/android/telecom/VideoProfile)!: The actual profile changes agreed to by the peer device. |

**See Also**

- `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSendSessionModifyRequest(android.telecom.VideoProfile,%20android.telecom.VideoProfile)`

### setCallDataUsage

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

```
open fun setCallDataUsage(dataUsage: Long): Unit
```

Used to inform listening `https://developer.android.com/reference/kotlin/android/telecom/InCallService` implementations when the data usage of the video associated with the current `https://developer.android.com/reference/kotlin/android/telecom/Connection` has changed.

This could be in response to a preview request via `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onRequestConnectionDataUsage()`, or as a periodic update by the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#`. Where periodic updates of data usage are provided, they should be provided at most for every 1 MB of data transferred and no more than once every 10 sec.

Received by the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback#onCallDataUsageChanged(kotlin.Long)`.

| Parameters ||
|---|---|
| `dataUsage` | [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html): The updated data usage (in bytes). Reported as the cumulative bytes used since the start of the call. |