# TvRecordingClient

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

# TvRecordingClient

*** ** * ** ***

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

`
public


class
TvRecordingClient
`  
`

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 |

<br />

*** ** * ** ***

The public interface object used to interact with a specific TV input service for TV program recording.

## Summary

|                                                                                                                                                       ### Nested classes                                                                                                                                                        ||
|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class` | [TvRecordingClient.RecordingCallback](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback) Callback used to receive various status updates on the[TvInputService.RecordingSession](https://developer.android.com/reference/android/media/tv/TvInputService.RecordingSession) |

|                                                                                                                                                                                                                                                                                                                                    ### Public constructors                                                                                                                                                                                                                                                                                                                                     ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[TvRecordingClient](https://developer.android.com/reference/android/media/tv/TvRecordingClient#TvRecordingClient(android.content.Context,%20java.lang.String,%20android.media.tv.TvRecordingClient.RecordingCallback,%20android.os.Handler))`(`[Context](https://developer.android.com/reference/android/content/Context)` context, `[String](https://developer.android.com/reference/java/lang/String)` tag, `[TvRecordingClient.RecordingCallback](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback)` callback, `[Handler](https://developer.android.com/reference/android/os/Handler)` handler) ` Creates a new TvRecordingClient object. |

|                                                                                                                                                                                                                                                                                                               ### Public methods                                                                                                                                                                                                                                                                                                               ||
|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[pauseRecording](https://developer.android.com/reference/android/media/tv/TvRecordingClient#pauseRecording())`() ` Pause TV program recording in the current recording session.                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` void` | ` `[pauseRecording](https://developer.android.com/reference/android/media/tv/TvRecordingClient#pauseRecording(android.os.Bundle))`(`[Bundle](https://developer.android.com/reference/android/os/Bundle)` params) ` Pause TV program recording in the current recording session.                                                                                                                                                                                                                                                                                                                                                       |
| ` void` | ` `[release](https://developer.android.com/reference/android/media/tv/TvRecordingClient#release())`() ` Releases the resources in the current recording session immediately.                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ` void` | ` `[resumeRecording](https://developer.android.com/reference/android/media/tv/TvRecordingClient#resumeRecording())`() ` Resume TV program recording only in recording pause status in the current recording session.                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ` void` | ` `[resumeRecording](https://developer.android.com/reference/android/media/tv/TvRecordingClient#resumeRecording(android.os.Bundle))`(`[Bundle](https://developer.android.com/reference/android/os/Bundle)` params) ` Resume TV program recording only in recording pause status in the current recording session.                                                                                                                                                                                                                                                                                                                     |
| ` void` | ` `[sendAppPrivateCommand](https://developer.android.com/reference/android/media/tv/TvRecordingClient#sendAppPrivateCommand(java.lang.String,%20android.os.Bundle))`(`[String](https://developer.android.com/reference/java/lang/String)` action, `[Bundle](https://developer.android.com/reference/android/os/Bundle)` data) ` Sends a private command to the underlying TV input.                                                                                                                                                                                                                                                   |
| ` void` | ` `[setTvInteractiveAppView](https://developer.android.com/reference/android/media/tv/TvRecordingClient#setTvInteractiveAppView(android.media.tv.interactive.TvInteractiveAppView,%20java.lang.String))`(`[TvInteractiveAppView](https://developer.android.com/reference/android/media/tv/interactive/TvInteractiveAppView)` view, `[String](https://developer.android.com/reference/java/lang/String)` recordingId) ` Sets the related[TvInteractiveAppView](https://developer.android.com/reference/android/media/tv/interactive/TvInteractiveAppView)instance so the interactive app service can be notified for recording events. |
| ` void` | ` `[startRecording](https://developer.android.com/reference/android/media/tv/TvRecordingClient#startRecording(android.net.Uri,%20android.os.Bundle))`(`[Uri](https://developer.android.com/reference/android/net/Uri)` programUri, `[Bundle](https://developer.android.com/reference/android/os/Bundle)` params) ` Starts TV program recording in the current recording session.                                                                                                                                                                                                                                                      |
| ` void` | ` `[startRecording](https://developer.android.com/reference/android/media/tv/TvRecordingClient#startRecording(android.net.Uri))`(`[Uri](https://developer.android.com/reference/android/net/Uri)` programUri) ` Starts TV program recording in the current recording session.                                                                                                                                                                                                                                                                                                                                                         |
| ` void` | ` `[stopRecording](https://developer.android.com/reference/android/media/tv/TvRecordingClient#stopRecording())`() ` Stops TV program recording in the current recording session.                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ` void` | ` `[tune](https://developer.android.com/reference/android/media/tv/TvRecordingClient#tune(java.lang.String,%20android.net.Uri,%20android.os.Bundle))`(`[String](https://developer.android.com/reference/java/lang/String)` inputId, `[Uri](https://developer.android.com/reference/android/net/Uri)` channelUri, `[Bundle](https://developer.android.com/reference/android/os/Bundle)` params) ` Tunes to a given channel for TV program recording.                                                                                                                                                                                   |
| ` void` | ` `[tune](https://developer.android.com/reference/android/media/tv/TvRecordingClient#tune(java.lang.String,%20android.net.Uri))`(`[String](https://developer.android.com/reference/java/lang/String)` inputId, `[Uri](https://developer.android.com/reference/android/net/Uri)` channelUri) ` Tunes to a given channel for TV program 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

### TvRecordingClient

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

```
public TvRecordingClient (Context context, 
                String tag, 
                TvRecordingClient.RecordingCallback callback, 
                Handler handler)
```

Creates a new TvRecordingClient object.

<br />

|                                                               Parameters                                                                ||
|------------|-----------------------------------------------------------------------------------------------------------------------------|
| `context`  | `Context`: The application context to create a TvRecordingClient with. <br />                                               |
| `tag`      | `String`: A short name for debugging purposes. <br />                                                                       |
| `callback` | `TvRecordingClient.RecordingCallback`: The callback to receive recording status changes. This value cannot be`null`. <br /> |
| `handler`  | `Handler`: The handler to invoke the callback on. <br />                                                                    |

## Public methods

### pauseRecording

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

```
public void pauseRecording ()
```

Pause TV program recording in the current recording session. Recording is expected to pause immediately when this method is called. If recording has not yet started in the current recording session, this method does nothing.

In pause status, the application can tune during recording. To continue recording, please call[TvRecordingClient.resumeRecording()](https://developer.android.com/reference/android/media/tv/TvRecordingClient#resumeRecording())to resume instead of[TvRecordingClient.startRecording(Uri)](https://developer.android.com/reference/android/media/tv/TvRecordingClient#startRecording(android.net.Uri)). Application can stop the recording with[TvRecordingClient.stopRecording()](https://developer.android.com/reference/android/media/tv/TvRecordingClient#stopRecording())in recording pause status.

If the pause request cannot be fulfilled, the recording session will respond by calling[RecordingCallback.onError(int)](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onError(int)).

<br />

### pauseRecording

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

```
public void pauseRecording (Bundle params)
```

Pause TV program recording in the current recording session. Recording is expected to pause immediately when this method is called. If recording has not yet started in the current recording session, this method does nothing.

In pause status, the application can tune during recording. To continue recording, please call[TvRecordingClient.resumeRecording()](https://developer.android.com/reference/android/media/tv/TvRecordingClient#resumeRecording())to resume instead of[TvRecordingClient.startRecording(Uri)](https://developer.android.com/reference/android/media/tv/TvRecordingClient#startRecording(android.net.Uri)). Application can stop the recording with[TvRecordingClient.stopRecording()](https://developer.android.com/reference/android/media/tv/TvRecordingClient#stopRecording())in recording pause status.

If the pause request cannot be fulfilled, the recording session will respond by calling[RecordingCallback.onError(int)](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onError(int)).

<br />

|                                          Parameters                                           ||
|----------|-------------------------------------------------------------------------------------|
| `params` | `Bundle`: Domain-specific data for this request. This value cannot be`null`. <br /> |

### release

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

```
public void release ()
```

Releases the resources in the current recording session immediately. This may be called at any time, however if the session is already released, it does nothing.

<br />

### resumeRecording

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

```
public void resumeRecording ()
```

Resume TV program recording only in recording pause status in the current recording session. Recording is expected to resume immediately when this method is called. If recording has not yet paused in the current recording session, this method does nothing.

When record is resumed, the recording is continue and can not re-tune. Application can stop the recording with[TvRecordingClient.stopRecording()](https://developer.android.com/reference/android/media/tv/TvRecordingClient#stopRecording())after record resumed.

If the pause request cannot be fulfilled, the recording session will respond by calling[RecordingCallback.onError(int)](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onError(int)).

<br />

### resumeRecording

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

```
public void resumeRecording (Bundle params)
```

Resume TV program recording only in recording pause status in the current recording session. Recording is expected to resume immediately when this method is called. If recording has not yet paused in the current recording session, this method does nothing.

When record is resumed, the recording is continues and can not re-tune. Application can stop the recording with[TvRecordingClient.stopRecording()](https://developer.android.com/reference/android/media/tv/TvRecordingClient#stopRecording())after record resumed.

If the resume request cannot be fulfilled, the recording session will respond by calling[RecordingCallback.onError(int)](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onError(int)).

<br />

|                                          Parameters                                           ||
|----------|-------------------------------------------------------------------------------------|
| `params` | `Bundle`: Domain-specific data for this request. This value cannot be`null`. <br /> |

### sendAppPrivateCommand

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

```
public void sendAppPrivateCommand (String action, 
                Bundle data)
```

Sends a private command to the underlying TV input. This can be used to provide domain-specific features that are only known between certain clients and their TV inputs.

<br />

|                                                                                                                 Parameters                                                                                                                 ||
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `action` | `String`: The name of the private command to send. This*must* be a scoped name, i.e. prefixed with a package name you own, so that different developers will not create conflicting commands. This value cannot be`null`. <br /> |
| `data`   | `Bundle`: An optional bundle to send with the command. <br />                                                                                                                                                                    |

### setTvInteractiveAppView

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

```
public void setTvInteractiveAppView (TvInteractiveAppView view, 
                String recordingId)
```

Sets the related[TvInteractiveAppView](https://developer.android.com/reference/android/media/tv/interactive/TvInteractiveAppView)instance so the interactive app service can be notified for recording events.

<br />

|                                                                                                                       Parameters                                                                                                                        ||
|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `view`        | `TvInteractiveAppView`: The related[TvInteractiveAppView](https://developer.android.com/reference/android/media/tv/interactive/TvInteractiveAppView)instance that is linked to this TV recording client.`null`to unlink the view. <br /> |
| `recordingId` | `String`: The ID of the recording which is assigned by the TV application.`null`if and only if the TvInteractiveAppView parameter is`null`. <br />                                                                                       |

|                                                                                                                        Throws                                                                                                                        ||
|--------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) | when recording ID is`null`and the TvInteractiveAppView is not`null`; or when recording ID is not`null`and the TvInteractiveAppView is`null`. |

**See also:**

- [TvInteractiveAppView.notifyRecordingScheduled(String, String)](https://developer.android.com/reference/android/media/tv/interactive/TvInteractiveAppView#notifyRecordingScheduled(java.lang.String,%20java.lang.String))
- [TvInteractiveAppView.notifyRecordingStarted(String, String)](https://developer.android.com/reference/android/media/tv/interactive/TvInteractiveAppView#notifyRecordingStarted(java.lang.String,%20java.lang.String))  

### startRecording

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

```
public void startRecording (Uri programUri, 
                Bundle params)
```

Starts TV program recording in the current recording session. Recording is expected to start immediately when this method is called. If the current recording session has not yet tuned to any channel, this method throws an exception.

The application may supply the URI for a TV program for filling in program specific data fields in the[TvContract.RecordedPrograms](https://developer.android.com/reference/android/media/tv/TvContract.RecordedPrograms)table. A non-null`programUri`implies the started recording should be of that specific program, whereas null`programUri`does not impose such a requirement and the recording can span across multiple TV programs. In either case, the application must call[TvRecordingClient.stopRecording()](https://developer.android.com/reference/android/media/tv/TvRecordingClient#stopRecording())to stop the recording.

The recording session will respond by calling[RecordingCallback.onError(int)](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onError(int))if the start request cannot be fulfilled.

<br />

|                                                                                                                Parameters                                                                                                                ||
|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `programUri` | `Uri`: The URI for the TV program to record, built by[TvContract.buildProgramUri(long)](https://developer.android.com/reference/android/media/tv/TvContract#buildProgramUri(long)). Can be`null`. <br />                   |
| `params`     | `Bundle`: Domain-specific data for this request. Keys*must* be a scoped name, i.e. prefixed with a package name you own, so that different developers will not create conflicting keys. This value cannot be`null`. <br /> |

|                                                                                                                                            Throws                                                                                                                                             ||
|--------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [IllegalStateException](https://developer.android.com/reference/java/lang/IllegalStateException) | If[tune(String, Uri)](https://developer.android.com/reference/android/media/tv/TvRecordingClient#tune(java.lang.String,%20android.net.Uri))request hasn't been handled yet or during pause. |

### startRecording

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

```
public void startRecording (Uri programUri)
```

Starts TV program recording in the current recording session. Recording is expected to start immediately when this method is called. If the current recording session has not yet tuned to any channel, this method throws an exception.

The application may supply the URI for a TV program for filling in program specific data fields in the[TvContract.RecordedPrograms](https://developer.android.com/reference/android/media/tv/TvContract.RecordedPrograms)table. A non-null`programUri`implies the started recording should be of that specific program, whereas null`programUri`does not impose such a requirement and the recording can span across multiple TV programs. In either case, the application must call[TvRecordingClient.stopRecording()](https://developer.android.com/reference/android/media/tv/TvRecordingClient#stopRecording())to stop the recording.

The recording session will respond by calling[RecordingCallback.onError(int)](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onError(int))if the start request cannot be fulfilled.

<br />

|                                                                                                       Parameters                                                                                                       ||
|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `programUri` | `Uri`: The URI for the TV program to record, built by[TvContract.buildProgramUri(long)](https://developer.android.com/reference/android/media/tv/TvContract#buildProgramUri(long)). Can be`null`. <br /> |

|                                                                                                                                            Throws                                                                                                                                             ||
|--------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [IllegalStateException](https://developer.android.com/reference/java/lang/IllegalStateException) | If[tune(String, Uri)](https://developer.android.com/reference/android/media/tv/TvRecordingClient#tune(java.lang.String,%20android.net.Uri))request hasn't been handled yet or during pause. |

### stopRecording

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

```
public void stopRecording ()
```

Stops TV program recording in the current recording session. Recording is expected to stop immediately when this method is called. If recording has not yet started in the current recording session, this method does nothing.

The recording session is expected to create 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 and pass the URI to that entry through to[RecordingCallback.onRecordingStopped(Uri)](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onRecordingStopped(android.net.Uri)). If the stop request cannot be fulfilled, the recording session will respond by calling[RecordingCallback.onError(int)](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onError(int)).

<br />

### tune

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

```
public void tune (String inputId, 
                Uri channelUri, 
                Bundle params)
```

Tunes to a given channel for TV program recording. The first tune request will create a new recording session for the corresponding TV input and establish a connection between the application and the session. If recording has already started in the current recording session, this method throws an exception. This can be used to provide domain-specific features that are only known between certain client and their TV inputs.

The application may call this method before starting or after stopping recording, but not during recording.

The recording session will respond by calling[RecordingCallback.onTuned(Uri)](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onTuned(android.net.Uri))if the tune request was fulfilled, or[RecordingCallback.onError(int)](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onError(int))otherwise.

<br />

|                                                                                                    Parameters                                                                                                     ||
|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `inputId`    | `String`: The ID of the TV input for the given channel. <br />                                                                                                                                      |
| `channelUri` | `Uri`: The URI of a channel. <br />                                                                                                                                                                 |
| `params`     | `Bundle`: Domain-specific data for this tune request. Keys*must* be a scoped name, i.e. prefixed with a package name you own, so that different developers will not create conflicting keys. <br /> |

|                                                               Throws                                                               ||
|--------------------------------------------------------------------------------------------------|----------------------------------|
| [IllegalStateException](https://developer.android.com/reference/java/lang/IllegalStateException) | If recording is already started. |

### tune

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

```
public void tune (String inputId, 
                Uri channelUri)
```

Tunes to a given channel for TV program recording. The first tune request will create a new recording session for the corresponding TV input and establish a connection between the application and the session. If recording has already started in the current recording session, this method throws an exception.

The application may call this method before starting or after stopping recording, but not during recording.

The recording session will respond by calling[RecordingCallback.onTuned(Uri)](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onTuned(android.net.Uri))if the tune request was fulfilled, or[RecordingCallback.onError(int)](https://developer.android.com/reference/android/media/tv/TvRecordingClient.RecordingCallback#onError(int))otherwise.

<br />

|                                  Parameters                                  ||
|--------------|----------------------------------------------------------------|
| `inputId`    | `String`: The ID of the TV input for the given channel. <br /> |
| `channelUri` | `Uri`: The URI of a channel. <br />                            |

|                                                               Throws                                                               ||
|--------------------------------------------------------------------------------------------------|----------------------------------|
| [IllegalStateException](https://developer.android.com/reference/java/lang/IllegalStateException) | If recording is already started. |