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

# Builder

*** ** * ** ***

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

```
class Builder
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.media.tv.TvInputInfo.Builder](https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo.Builder#) |

A convenience builder for creating `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo` objects.

## Summary

| Public constructors ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo.Builder#Builder(android.content.Context,%20android.content.ComponentName)(context: https://developer.android.com/reference/kotlin/android/content/Context.html#!, component: https://developer.android.com/reference/kotlin/android/content/ComponentName.html#!)` Constructs a new builder for `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo`. |

| Public methods ||
|---|---|
| [TvInputInfo](https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo)! | `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo.Builder#build()()` Creates a `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo` instance with the specified fields. |
| [TvInputInfo.Builder](https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo.Builder#) | `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo.Builder#setCanPauseRecording(kotlin.Boolean)(canPauseRecording: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` Sets whether this TV input can pause recording TV programs or not. |
| [TvInputInfo.Builder](https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo.Builder#)! | `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo.Builder#setCanRecord(kotlin.Boolean)(canRecord: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` Sets whether this TV input can record TV programs or not. |
| [TvInputInfo.Builder](https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo.Builder#)! | `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo.Builder#setExtras(android.os.Bundle)(extras: https://developer.android.com/reference/kotlin/android/os/Bundle.html#!)` Sets domain-specific extras associated with this TV input. |
| [TvInputInfo.Builder](https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo.Builder#)! | `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo.Builder#setTunerCount(kotlin.Int)(tunerCount: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)` Sets the tuner count. |

## Public constructors

### Builder

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

```
Builder(
    context: Context!, 
    component: ComponentName!)
```

Constructs a new builder for `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo`.

| Parameters ||
|---|---|
| `context` | [Context](https://developer.android.com/reference/kotlin/android/content/Context.html#)!: A Context of the application package implementing this class. |
| `component` | [ComponentName](https://developer.android.com/reference/kotlin/android/content/ComponentName.html#)!: The name of the application component to be used for the `https://developer.android.com/reference/kotlin/android/media/tv/TvInputService`. |

## Public methods

### build

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

```
fun build(): TvInputInfo!
```

Creates a `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo` instance with the specified fields. Most of the information is obtained by parsing the AndroidManifest and `https://developer.android.com/reference/kotlin/android/media/tv/TvInputService#SERVICE_META_DATA:kotlin.String` for the `https://developer.android.com/reference/kotlin/android/media/tv/TvInputService` this TV input implements.

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo!` | TvInputInfo containing information about this TV input. |

### setCanPauseRecording

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

```
fun setCanPauseRecording(canPauseRecording: Boolean): TvInputInfo.Builder
```

Sets whether this TV input can pause recording TV programs or not.

| Parameters ||
|---|---|
| `canPauseRecording` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): Whether this TV input can pause recording TV programs. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo.Builder#` | This Builder object to allow for chaining of calls to builder methods. This value cannot be `null`. |

### setCanRecord

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

```
fun setCanRecord(canRecord: Boolean): TvInputInfo.Builder!
```

Sets whether this TV input can record TV programs or not.

| Parameters ||
|---|---|
| `canRecord` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): Whether this TV input can record TV programs. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo.Builder#!` | This Builder object to allow for chaining of calls to builder methods. |

### setExtras

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

```
fun setExtras(extras: Bundle!): TvInputInfo.Builder!
```

Sets domain-specific extras associated with this TV input.

| Parameters ||
|---|---|
| `extras` | [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html#)!: Domain-specific extras associated with this TV input. Keys *must* be a scoped name, i.e. prefixed with a package name you own, so that different developers will not create conflicting keys. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo.Builder#!` | This Builder object to allow for chaining of calls to builder methods. |

### setTunerCount

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

```
fun setTunerCount(tunerCount: Int): TvInputInfo.Builder!
```

Sets the tuner count. Valid only for `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo#TYPE_TUNER:kotlin.Int`.

| Parameters ||
|---|---|
| `tunerCount` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The number of tuners this TV input has. |

| Return ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/media/tv/TvInputInfo.Builder#!` | This Builder object to allow for chaining of calls to builder methods. |