# RemoteConnection.VideoProvider

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/RemoteConnection.VideoProvider#nestedclasses)\|[Methods](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider#inhmethods)  

# RemoteConnection.VideoProvider

*** ** * ** ***

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

`
public
static


class
RemoteConnection.VideoProvider
`  
`

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


``


`

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

<br />

*** ** * ** ***

[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider)associated with a[RemoteConnection](https://developer.android.com/reference/android/telecom/RemoteConnection). Used to receive video related events and control the video associated with a[RemoteConnection](https://developer.android.com/reference/android/telecom/RemoteConnection).  
**See also:**

- [Connection.VideoProvider](https://developer.android.com/reference/android/telecom/Connection.VideoProvider)

## Summary

|                                                                                                                                                                                                              ### Nested classes                                                                                                                                                                                                              ||
|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class` | [RemoteConnection.VideoProvider.Callback](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider.Callback) Callback class used by the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider)to relay events from the[Connection.VideoProvider](https://developer.android.com/reference/android/telecom/Connection.VideoProvider). |

|                                                                                                                                                                                                                                                                                                           ### Public methods                                                                                                                                                                                                                                                                                                           ||
|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[registerCallback](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider#registerCallback(android.telecom.RemoteConnection.VideoProvider.Callback))`(`[RemoteConnection.VideoProvider.Callback](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider.Callback)` l) ` Registers a callback to receive commands and state changes for video calls.                                                                                                                                                                                                        |
| ` void` | ` `[requestCallDataUsage](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider#requestCallDataUsage())`() ` Issues a request to retrieve the data usage (in bytes) of the video portion of the[RemoteConnection](https://developer.android.com/reference/android/telecom/RemoteConnection)for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).                                                                                                                                                                  |
| ` void` | ` `[requestCameraCapabilities](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider#requestCameraCapabilities())`() ` Issues a request to retrieve the capabilities of the current camera for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).                                                                                                                                                                                                                                                                  |
| ` void` | ` `[sendSessionModifyRequest](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider#sendSessionModifyRequest(android.telecom.VideoProfile,%20android.telecom.VideoProfile))`(`[VideoProfile](https://developer.android.com/reference/android/telecom/VideoProfile)` fromProfile, `[VideoProfile](https://developer.android.com/reference/android/telecom/VideoProfile)` toProfile) ` Issues a request to modify the properties of the current video session for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider). |
| ` void` | ` `[sendSessionModifyResponse](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider#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 for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).                                                                                                               |
| ` void` | ` `[setCamera](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider#setCamera(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` cameraId) ` Sets the camera to be used for the outgoing video for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).                                                                                                                                                                                                                       |
| ` void` | ` `[setDeviceOrientation](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider#setDeviceOrientation(int))`(int rotation) ` Sets the device orientation, in degrees, for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).                                                                                                                                                                                                                                                                                        |
| ` void` | ` `[setDisplaySurface](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider#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 for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).                                                                                                                                                            |
| ` void` | ` `[setPauseImage](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider#setPauseImage(android.net.Uri))`(`[Uri](https://developer.android.com/reference/android/net/Uri)` uri) ` Sets 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, for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).                                                                                                                     |
| ` void` | ` `[setPreviewSurface](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider#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 for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).                                                                                                                                           |
| ` void` | ` `[setZoom](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider#setZoom(float))`(float value) ` Sets camera zoom ratio for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).                                                                                                                                                                                                                                                                                                                                   |
| ` void` | ` `[unregisterCallback](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider#unregisterCallback(android.telecom.RemoteConnection.VideoProvider.Callback))`(`[RemoteConnection.VideoProvider.Callback](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider.Callback)` l) ` Clears the video call callback set via[registerCallback(Callback)](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider#registerCallback(android.telecom.RemoteConnection.VideoProvider.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 methods

### registerCallback

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

```
public void registerCallback (RemoteConnection.VideoProvider.Callback l)
```

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

<br />

|                                   Parameters                                    ||
|-----|----------------------------------------------------------------------------|
| `l` | `RemoteConnection.VideoProvider.Callback`: The video call callback. <br /> |

### requestCallDataUsage

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

```
public void requestCallDataUsage ()
```

Issues a request to retrieve the data usage (in bytes) of the video portion of the[RemoteConnection](https://developer.android.com/reference/android/telecom/RemoteConnection)for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).

<br />

**See also:**

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

### requestCameraCapabilities

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

```
public void requestCameraCapabilities ()
```

Issues a request to retrieve the capabilities of the current camera for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).

<br />

**See also:**

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

### sendSessionModifyRequest

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

```
public void sendSessionModifyRequest (VideoProfile fromProfile, 
                VideoProfile toProfile)
```

Issues a request to modify the properties of the current video session for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).

<br />

|                                        Parameters                                        ||
|---------------|---------------------------------------------------------------------------|
| `fromProfile` | `VideoProfile`: The video profile prior to the request. <br />            |
| `toProfile`   | `VideoProfile`: The video profile with the requested changes made. <br /> |

**See also:**

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

### sendSessionModifyResponse

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

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

Provides a response to a request to change the current call video session properties for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).

<br />

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

**See also:**

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

### setCamera

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

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

Sets the camera to be used for the outgoing video for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).

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

**See also:**

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

### setDeviceOrientation

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

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

Sets the device orientation, in degrees, for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider). Assumes that a standard portrait orientation of the device is 0 degrees.

<br />

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

**See also:**

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

### setDisplaySurface

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

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

Sets the surface to be used for displaying the video received from the remote device for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).

<br />

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

**See also:**

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

### setPauseImage

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

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

Sets 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, for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).

<br />

|     Parameters      ||
|-------|--------------|
| `uri` | `Uri` <br /> |

**See also:**

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

### setPreviewSurface

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

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

Sets the surface to be used for displaying a preview of what the user's camera is currently capturing for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).

<br />

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

**See also:**

- [Connection.VideoProvider.onSetPreviewSurface(Surface)](https://developer.android.com/reference/android/telecom/Connection.VideoProvider#onSetPreviewSurface(android.view.Surface))  

### setZoom

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

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

Sets camera zoom ratio for the[RemoteConnection.VideoProvider](https://developer.android.com/reference/android/telecom/RemoteConnection.VideoProvider).

<br />

|                   Parameters                    ||
|---------|----------------------------------------|
| `value` | `float`: The camera zoom ratio. <br /> |

**See also:**

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

### unregisterCallback

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

```
public void unregisterCallback (RemoteConnection.VideoProvider.Callback l)
```

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

<br />

|                                        Parameters                                        ||
|-----|-------------------------------------------------------------------------------------|
| `l` | `RemoteConnection.VideoProvider.Callback`: The video call callback to clear. <br /> |