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

# VideoCall

*** ** * ** ***

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

```
abstract class VideoCall
```

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

Used to issue commands to the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider` associated with a `https://developer.android.com/reference/kotlin/android/telecom/Call`.

## Summary

| Nested classes ||
|---|---|
| abstract | `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback` The `https://developer.android.com/reference/kotlin/android/telecom/InCallService` extends this class to provide a means of receiving callbacks from the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider`. |

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

| Public methods ||
|---|---|
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#registerCallback(android.telecom.InCallService.VideoCall.Callback)(callback: https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback!)` Registers a callback to receive commands and state changes for video calls. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#registerCallback(android.telecom.InCallService.VideoCall.Callback,%20android.os.Handler)(callback: https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback!, handler: https://developer.android.com/reference/kotlin/android/os/Handler.html#!)` Registers a callback to receive commands and state changes for video calls. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#requestCallDataUsage()()` Issues a request to the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider` to retrieve the cumulative data usage for the video component of the current call (in bytes). |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#requestCameraCapabilities()()` Issues a request to the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider` to retrieve the capabilities of the current camera. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#sendSessionModifyRequest(android.telecom.VideoProfile)(requestProfile: 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/InCallService.VideoCall#sendSessionModifyResponse(android.telecom.VideoProfile)(responseProfile: https://developer.android.com/reference/kotlin/android/telecom/VideoProfile!)` Provides a response to a request to change the current call video session properties. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#setCamera(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/InCallService.VideoCall#setDeviceOrientation(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/InCallService.VideoCall#setDisplaySurface(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/InCallService.VideoCall#setPauseImage(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/InCallService.VideoCall#setPreviewSurface(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/InCallService.VideoCall#setZoom(kotlin.Float)(value: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)` Sets the camera zoom ratio. |
| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#unregisterCallback(android.telecom.InCallService.VideoCall.Callback)(callback: https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback!)` Clears the video call callback set via #registerCallback. |

## Public constructors

### VideoCall

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

```
VideoCall()
```

## Public methods

### registerCallback

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

```
abstract fun registerCallback(callback: InCallService.VideoCall.Callback!): Unit
```

Registers a callback to receive commands and state changes for video calls.

| Parameters ||
|---|---|
| `callback` | [InCallService.VideoCall.Callback](https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback)!: The video call callback. |

### registerCallback

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

```
abstract fun registerCallback(
    callback: InCallService.VideoCall.Callback!, 
    handler: Handler!
): Unit
```

Registers a callback to receive commands and state changes for video calls.

| Parameters ||
|---|---|
| `callback` | [InCallService.VideoCall.Callback](https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback)!: The video call callback. |
| `handler` | [Handler](https://developer.android.com/reference/kotlin/android/os/Handler.html#)!: A handler which commands and status changes will be delivered to. |

### requestCallDataUsage

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

```
abstract fun requestCallDataUsage(): Unit
```

Issues a request to the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider` to retrieve the cumulative data usage for the video component of the current call (in bytes). Data usage is reported to the caller via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback#onCallDataUsageChanged(kotlin.Long)`.

Handled by `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onRequestConnectionDataUsage()`.

### requestCameraCapabilities

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

```
abstract fun requestCameraCapabilities(): Unit
```

Issues a request to the `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider` to retrieve the capabilities of the current camera. The current camera is selected using `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall#setCamera(kotlin.String)`.

Camera capabilities are reported to the caller via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback#onCameraCapabilitiesChanged(android.telecom.VideoProfile.CameraCapabilities)`.

Handled by `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onRequestCameraCapabilities()`.

### sendSessionModifyRequest

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

```
abstract fun sendSessionModifyRequest(requestProfile: 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.

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

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

### sendSessionModifyResponse

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

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

Provides a response to a request to change the current call video session properties. This should be called in response to a request the `https://developer.android.com/reference/kotlin/android/telecom/InCallService` has received via `https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback#onSessionModifyRequestReceived(android.telecom.VideoProfile)`.

Handled by `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSendSessionModifyResponse(android.telecom.VideoProfile)`.

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

### setCamera

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

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

Sets the camera to be used for the outgoing video.

Handled by `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSetCamera(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()`). |

### setDeviceOrientation

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

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

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

Handled by `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSetDeviceOrientation(kotlin.Int)`.

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

### setDisplaySurface

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

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

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

Handled by `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSetDisplaySurface(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#`. |

### setPauseImage

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

```
abstract fun setPauseImage(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.

Handled by `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSetPauseImage(android.net.Uri)`.

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

### setPreviewSurface

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

```
abstract fun setPreviewSurface(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.

Handled by `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSetPreviewSurface(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#`. |

### setZoom

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

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

Sets the camera zoom ratio.

Handled by `https://developer.android.com/reference/kotlin/android/telecom/Connection.VideoProvider#onSetZoom(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`. |

### unregisterCallback

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

```
abstract fun unregisterCallback(callback: InCallService.VideoCall.Callback!): Unit
```

Clears the video call callback set via #registerCallback.

| Parameters ||
|---|---|
| `callback` | [InCallService.VideoCall.Callback](https://developer.android.com/reference/kotlin/android/telecom/InCallService.VideoCall.Callback)!: The video call callback to clear. |