# InCallService.VideoCall

Added in[API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Nested Classes](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#nestedclasses)\|[Ctors](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#pubctors)\|[Methods](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#inhmethods)  

# InCallService.VideoCall

*** ** * ** ***

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

`
public
static

abstract
class
InCallService.VideoCall
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

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

<br />

*** ** * ** ***

Used to issue commands to the[Connection.VideoProvider](https://developer.android.com/reference/android/telecom/Connection.VideoProvider)associated with a[Call](https://developer.android.com/reference/android/telecom/Call).

## Summary

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

|                                               ### Public constructors                                               ||
|------------------------------------------------------------------------------------------------------------------|---|
| ` `[VideoCall](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#VideoCall())`() ` |

|                                                                                                                                                                                                                                                                         ### Public methods                                                                                                                                                                                                                                                                          ||
|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void` | ` `[registerCallback](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#registerCallback(android.telecom.InCallService.VideoCall.Callback,%20android.os.Handler))`(`[InCallService.VideoCall.Callback](https://developer.android.com/reference/android/telecom/InCallService.VideoCall.Callback)` callback, `[Handler](https://developer.android.com/reference/android/os/Handler)` handler) ` Registers a callback to receive commands and state changes for video calls.                                          |
| ` abstract void` | ` `[registerCallback](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#registerCallback(android.telecom.InCallService.VideoCall.Callback))`(`[InCallService.VideoCall.Callback](https://developer.android.com/reference/android/telecom/InCallService.VideoCall.Callback)` callback) ` Registers a callback to receive commands and state changes for video calls.                                                                                                                                                 |
| ` abstract void` | ` `[requestCallDataUsage](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#requestCallDataUsage())`() ` Issues a request to the[Connection.VideoProvider](https://developer.android.com/reference/android/telecom/Connection.VideoProvider)to retrieve the cumulative data usage for the video component of the current call (in bytes).                                                                                                                                                                           |
| ` abstract void` | ` `[requestCameraCapabilities](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#requestCameraCapabilities())`() ` Issues a request to the[Connection.VideoProvider](https://developer.android.com/reference/android/telecom/Connection.VideoProvider)to retrieve the capabilities of the current camera.                                                                                                                                                                                                           |
| ` abstract void` | ` `[sendSessionModifyRequest](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#sendSessionModifyRequest(android.telecom.VideoProfile))`(`[VideoProfile](https://developer.android.com/reference/android/telecom/VideoProfile)` requestProfile) ` Issues a request to modify the properties of the current video session.                                                                                                                                                                                           |
| ` abstract void` | ` `[sendSessionModifyResponse](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#sendSessionModifyResponse(android.telecom.VideoProfile))`(`[VideoProfile](https://developer.android.com/reference/android/telecom/VideoProfile)` responseProfile) ` Provides a response to a request to change the current call video session properties.                                                                                                                                                                          |
| ` abstract void` | ` `[setCamera](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#setCamera(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` cameraId) ` Sets the camera to be used for the outgoing video.                                                                                                                                                                                                                                                                                  |
| ` abstract void` | ` `[setDeviceOrientation](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#setDeviceOrientation(int))`(int rotation) ` Sets the device orientation, in degrees.                                                                                                                                                                                                                                                                                                                                                    |
| ` abstract void` | ` `[setDisplaySurface](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#setDisplaySurface(android.view.Surface))`(`[Surface](https://developer.android.com/reference/android/view/Surface)` surface) ` Sets the surface to be used for displaying the video received from the remote device.                                                                                                                                                                                                                       |
| ` abstract void` | ` `[setPauseImage](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#setPauseImage(android.net.Uri))`(`[Uri](https://developer.android.com/reference/android/net/Uri)` uri) ` Provides the[Connection.VideoProvider](https://developer.android.com/reference/android/telecom/Connection.VideoProvider)with the[Uri](https://developer.android.com/reference/android/net/Uri)of an image to be displayed to the peer device when the video signal is paused.                                                         |
| ` abstract void` | ` `[setPreviewSurface](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#setPreviewSurface(android.view.Surface))`(`[Surface](https://developer.android.com/reference/android/view/Surface)` surface) ` Sets the surface to be used for displaying a preview of what the user's camera is currently capturing.                                                                                                                                                                                                      |
| ` abstract void` | ` `[setZoom](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#setZoom(float))`(float value) ` Sets the camera zoom ratio.                                                                                                                                                                                                                                                                                                                                                                                          |
| ` abstract void` | ` `[unregisterCallback](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#unregisterCallback(android.telecom.InCallService.VideoCall.Callback))`(`[InCallService.VideoCall.Callback](https://developer.android.com/reference/android/telecom/InCallService.VideoCall.Callback)` callback) ` Clears the video call callback set via[registerCallback(Callback)](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#registerCallback(android.telecom.InCallService.VideoCall.Callback)). |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](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 `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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 constructors

### VideoCall

```
public VideoCall ()
```

<br />

<br />

## Public methods

### registerCallback

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

```
public abstract void registerCallback (InCallService.VideoCall.Callback callback, 
                Handler handler)
```

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

<br />

|                                           Parameters                                            ||
|------------|-------------------------------------------------------------------------------------|
| `callback` | `InCallService.VideoCall.Callback`: The video call callback. <br />                 |
| `handler`  | `Handler`: A handler which commands and status changes will be delivered to. <br /> |

### registerCallback

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

```
public abstract void registerCallback (InCallService.VideoCall.Callback callback)
```

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

<br />

|                                   Parameters                                    ||
|------------|---------------------------------------------------------------------|
| `callback` | `InCallService.VideoCall.Callback`: The video call callback. <br /> |

### requestCallDataUsage

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

```
public abstract void requestCallDataUsage ()
```

Issues a request to the[Connection.VideoProvider](https://developer.android.com/reference/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[InCallService.VideoCall.Callback.onCallDataUsageChanged(long)](https://developer.android.com/reference/android/telecom/InCallService.VideoCall.Callback#onCallDataUsageChanged(long)).

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

<br />

### requestCameraCapabilities

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

```
public abstract void requestCameraCapabilities ()
```

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

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

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

<br />

### sendSessionModifyRequest

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

```
public abstract void sendSessionModifyRequest (VideoProfile requestProfile)
```

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[InCallService](https://developer.android.com/reference/android/telecom/InCallService)is no longer the foreground application.

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

<br />

|                                  Parameters                                   ||
|------------------|-------------------------------------------------------------|
| `requestProfile` | `VideoProfile`: The requested call video properties. <br /> |

### sendSessionModifyResponse

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

```
public abstract void sendSessionModifyResponse (VideoProfile responseProfile)
```

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

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

<br />

|                                  Parameters                                   ||
|-------------------|------------------------------------------------------------|
| `responseProfile` | `VideoProfile`: The response call video properties. <br /> |

### setCamera

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

```
public abstract void setCamera (String cameraId)
```

Sets the camera to be used for the outgoing video.

Handled by[Connection.VideoProvider.onSetCamera(String)](https://developer.android.com/reference/android/telecom/Connection.VideoProvider#onSetCamera(java.lang.String)).

<br />

|                                                                                                   Parameters                                                                                                   ||
|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `cameraId` | `String`: The id of the camera (use ids as reported by[CameraManager.getCameraIdList()](https://developer.android.com/reference/android/hardware/camera2/CameraManager#getCameraIdList())). <br /> |

### setDeviceOrientation

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

```
public abstract void setDeviceOrientation (int rotation)
```

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

Handled by[Connection.VideoProvider.onSetDeviceOrientation(int)](https://developer.android.com/reference/android/telecom/Connection.VideoProvider#onSetDeviceOrientation(int)).

<br />

|                          Parameters                           ||
|------------|---------------------------------------------------|
| `rotation` | `int`: The device orientation, in degrees. <br /> |

### setDisplaySurface

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

```
public abstract void setDisplaySurface (Surface surface)
```

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

Handled by[Connection.VideoProvider.onSetDisplaySurface(Surface)](https://developer.android.com/reference/android/telecom/Connection.VideoProvider#onSetDisplaySurface(android.view.Surface)).

<br />

|                                                Parameters                                                ||
|-----------|-----------------------------------------------------------------------------------------------|
| `surface` | `Surface`: The[Surface](https://developer.android.com/reference/android/view/Surface). <br /> |

### setPauseImage

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

```
public abstract void setPauseImage (Uri uri)
```

Provides the[Connection.VideoProvider](https://developer.android.com/reference/android/telecom/Connection.VideoProvider)with the[Uri](https://developer.android.com/reference/android/net/Uri)of an image to be displayed to the peer device when the video signal is paused.

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

<br />

|                  Parameters                   ||
|-------|----------------------------------------|
| `uri` | `Uri`: URI of image to display. <br /> |

### setPreviewSurface

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

```
public abstract void setPreviewSurface (Surface surface)
```

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[Connection.VideoProvider.onSetPreviewSurface(Surface)](https://developer.android.com/reference/android/telecom/Connection.VideoProvider#onSetPreviewSurface(android.view.Surface)).

<br />

|                                                Parameters                                                ||
|-----------|-----------------------------------------------------------------------------------------------|
| `surface` | `Surface`: The[Surface](https://developer.android.com/reference/android/view/Surface). <br /> |

### setZoom

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

```
public abstract void setZoom (float value)
```

Sets the camera zoom ratio.

Handled by[Connection.VideoProvider.onSetZoom(float)](https://developer.android.com/reference/android/telecom/Connection.VideoProvider#onSetZoom(float)).

<br />

|                                                                                                                                     Parameters                                                                                                                                      ||
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `value` | `float`: The camera zoom ratio; for the current camera, should be a value in the range defined by[CameraCharacteristics.CONTROL_ZOOM_RATIO_RANGE](https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE). <br /> |

### unregisterCallback

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

```
public abstract void unregisterCallback (InCallService.VideoCall.Callback callback)
```

Clears the video call callback set via[registerCallback(Callback)](https://developer.android.com/reference/android/telecom/InCallService.VideoCall#registerCallback(android.telecom.InCallService.VideoCall.Callback)).

<br />

|                                        Parameters                                        ||
|------------|------------------------------------------------------------------------------|
| `callback` | `InCallService.VideoCall.Callback`: The video call callback to clear. <br /> |