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/TvInputInfo.Builder#pubctors) \| [Methods](https://developer.android.com/reference/android/media/tv/TvInputInfo.Builder#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/media/tv/TvInputInfo.Builder#inhmethods)

# TvInputInfo.Builder

*** ** * ** ***

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


`
public
static
final

class
TvInputInfo.Builder
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

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

<br />

*** ** * ** ***

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

## Summary

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

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

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

### Builder

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

```
public Builder (Context context, 
                ComponentName component)
```

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

<br />

| Parameters ||
|---|---|
| `context` | `Context`: A Context of the application package implementing this class. <br /> |
| `component` | `ComponentName`: The name of the application component to be used for the `https://developer.android.com/reference/android/media/tv/TvInputService`. <br /> |

## Public methods

### build

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

```
public TvInputInfo build ()
```

Creates a `https://developer.android.com/reference/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/android/media/tv/TvInputService#SERVICE_META_DATA`
for the `https://developer.android.com/reference/android/media/tv/TvInputService` this TV input implements.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/media/tv/TvInputInfo` | TvInputInfo containing information about this TV input. <br /> |

### setCanPauseRecording

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

```
public TvInputInfo.Builder setCanPauseRecording (boolean canPauseRecording)
```

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

<br />

| Parameters ||
|---|---|
| `canPauseRecording` | `boolean`: Whether this TV input can pause recording TV programs. <br /> |

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

### setCanRecord

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

```
public TvInputInfo.Builder setCanRecord (boolean canRecord)
```

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

<br />

| Parameters ||
|---|---|
| `canRecord` | `boolean`: Whether this TV input can record TV programs. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/media/tv/TvInputInfo.Builder` | This Builder object to allow for chaining of calls to builder methods. <br /> |

### setExtras

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

```
public TvInputInfo.Builder setExtras (Bundle extras)
```

Sets domain-specific extras associated with this TV input.

<br />

| Parameters ||
|---|---|
| `extras` | `Bundle`: 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. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/media/tv/TvInputInfo.Builder` | This Builder object to allow for chaining of calls to builder methods. <br /> |

### setTunerCount

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

```
public TvInputInfo.Builder setTunerCount (int tunerCount)
```

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

<br />

| Parameters ||
|---|---|
| `tunerCount` | `int`: The number of tuners this TV input has. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/media/tv/TvInputInfo.Builder` | This Builder object to allow for chaining of calls to builder methods. <br /> |