# TvRecordingClient.RecordingCallback

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Ctors](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#pubctors)\|[Methods](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#inhmethods)  

# TvRecordingClient.RecordingCallback

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/media/tv/TvRecordingClient.RecordingCallback "View this page in Kotlin")\|Java

`
public
static

abstract
class
TvRecordingClient.RecordingCallback
`  
`

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


``


`

|---|------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.media.tv.TvRecordingClient.RecordingCallback |

<br />

*** ** * ** ***

Callback used to receive various status updates on the[TvInputService.RecordingSession](https://developer.android.com/reference/android/media/tv/TvInputService.RecordingSession)

## Summary

|                                                             ### Public constructors                                                              ||
|-----------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[RecordingCallback](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#RecordingCallback())`() ` |

|                                                                                                                                                                                                                                                            ### Public methods                                                                                                                                                                                                                                                             ||
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[onConnectionFailed](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onConnectionFailed(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` inputId) ` This is called when an error occurred while establishing a connection to the recording session for the corresponding TV input.                                                                                                                                                       |
| ` void` | ` `[onDisconnected](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onDisconnected(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` inputId) ` This is called when the connection to the current recording session is lost.                                                                                                                                                                                                                 |
| ` void` | ` `[onError](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onError(int))`(int error) ` This is called when an issue has occurred.                                                                                                                                                                                                                                                                                                                                                 |
| ` void` | ` `[onRecordingStopped](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onRecordingStopped(android.net.Uri))`(`[Uri](https://developer.android.com/reference/android/net/Uri)` recordedProgramUri) ` This is called when the current recording session has stopped recording and created a new data entry in the[TvContract.RecordedPrograms](https://developer.android.com/reference/android/media/tv/TvContract.RecordedPrograms)table that describes the newly recorded program. |
| ` void` | ` `[onTuned](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onTuned(android.net.Uri))`(`[Uri](https://developer.android.com/reference/android/net/Uri)` channelUri) ` This is called when the recording session has been tuned to the given channel and is ready to start recording.                                                                                                                                                                                               |

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

### RecordingCallback

```
public RecordingCallback ()
```

<br />

<br />

## Public methods

### onConnectionFailed

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

```
public void onConnectionFailed (String inputId)
```

This is called when an error occurred while establishing a connection to the recording session for the corresponding TV input.

<br />

|                                         Parameters                                         ||
|-----------|---------------------------------------------------------------------------------|
| `inputId` | `String`: The ID of the TV input bound to the current TvRecordingClient. <br /> |

### onDisconnected

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

```
public void onDisconnected (String inputId)
```

This is called when the connection to the current recording session is lost.

<br />

|                                         Parameters                                         ||
|-----------|---------------------------------------------------------------------------------|
| `inputId` | `String`: The ID of the TV input bound to the current TvRecordingClient. <br /> |

### onError

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

```
public void onError (int error)
```

This is called when an issue has occurred. It may be called at any time after the current recording session is created until it is released.

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Parameters                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ||
|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `error` | `int`: The error code. Should be one of the followings. - [TvInputManager.RECORDING_ERROR_UNKNOWN](https://developer.android.com/reference/android/media/tv/TvInputManager#RECORDING_ERROR_UNKNOWN) - [TvInputManager.RECORDING_ERROR_INSUFFICIENT_SPACE](https://developer.android.com/reference/android/media/tv/TvInputManager#RECORDING_ERROR_INSUFFICIENT_SPACE) - [TvInputManager.RECORDING_ERROR_RESOURCE_BUSY](https://developer.android.com/reference/android/media/tv/TvInputManager#RECORDING_ERROR_RESOURCE_BUSY) Value is[TvInputManager.RECORDING_ERROR_UNKNOWN](https://developer.android.com/reference/android/media/tv/TvInputManager#RECORDING_ERROR_UNKNOWN),[TvInputManager.RECORDING_ERROR_INSUFFICIENT_SPACE](https://developer.android.com/reference/android/media/tv/TvInputManager#RECORDING_ERROR_INSUFFICIENT_SPACE), or[TvInputManager.RECORDING_ERROR_RESOURCE_BUSY](https://developer.android.com/reference/android/media/tv/TvInputManager#RECORDING_ERROR_RESOURCE_BUSY) <br /> |

### onRecordingStopped

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

```
public void onRecordingStopped (Uri recordedProgramUri)
```

This is called when the current recording session has stopped recording and created a new data entry in the[TvContract.RecordedPrograms](https://developer.android.com/reference/android/media/tv/TvContract.RecordedPrograms)table that describes the newly recorded program.

<br />

|                                 Parameters                                  ||
|----------------------|-------------------------------------------------------|
| `recordedProgramUri` | `Uri`: The URI for the newly recorded program. <br /> |

### onTuned

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

```
public void onTuned (Uri channelUri)
```

This is called when the recording session has been tuned to the given channel and is ready to start recording.

<br />

|                    Parameters                     ||
|--------------|-------------------------------------|
| `channelUri` | `Uri`: The URI of a channel. <br /> |