# TvInputInfo

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Nested Classes](https://developer.android.com/reference/android/media/tv/TvInputInfo#nestedclasses)\|[Constants](https://developer.android.com/reference/android/media/tv/TvInputInfo#constants)\|[Inherited Constants](https://developer.android.com/reference/android/media/tv/TvInputInfo#inhconstants)\|[Fields](https://developer.android.com/reference/android/media/tv/TvInputInfo#lfields)\|[Methods](https://developer.android.com/reference/android/media/tv/TvInputInfo#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/media/tv/TvInputInfo#inhmethods)  

# TvInputInfo

*** ** * ** ***

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

`
public

final

class
TvInputInfo
`  
`

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


``


implements

`[Parcelable](https://developer.android.com/reference/android/os/Parcelable)`


`

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

<br />

*** ** * ** ***

This class is used to specify meta information of a TV input.

## Summary

|                                                                                                             ### Nested classes                                                                                                              ||
|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class` | [TvInputInfo.Builder](https://developer.android.com/reference/android/media/tv/TvInputInfo.Builder) A convenience builder for creating[TvInputInfo](https://developer.android.com/reference/android/media/tv/TvInputInfo)objects. |

|                                                                                                                                                                                            ### Constants                                                                                                                                                                                            ||
|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | [EXTRA_INPUT_ID](https://developer.android.com/reference/android/media/tv/TvInputInfo#EXTRA_INPUT_ID) Used as a String extra field in setup intents created by[createSetupIntent()](https://developer.android.com/reference/android/media/tv/TvInputInfo#createSetupIntent())to supply the ID of a specific TV input to set up. |
| `int`                                                              | [TYPE_COMPONENT](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_COMPONENT) TV input type: the TV input service represents a component port.                                                                                                                                                          |
| `int`                                                              | [TYPE_COMPOSITE](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_COMPOSITE) TV input type: the TV input service represents a composite port.                                                                                                                                                          |
| `int`                                                              | [TYPE_DISPLAY_PORT](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_DISPLAY_PORT) TV input type: the TV input service represents a display port.                                                                                                                                                      |
| `int`                                                              | [TYPE_DVI](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_DVI) TV input type: the TV input service represents a DVI port.                                                                                                                                                                            |
| `int`                                                              | [TYPE_HDMI](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_HDMI) TV input type: the TV input service is HDMI.                                                                                                                                                                                        |
| `int`                                                              | [TYPE_OTHER](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_OTHER) TV input type: a generic hardware TV input type.                                                                                                                                                                                  |
| `int`                                                              | [TYPE_SCART](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_SCART) TV input type: the TV input service represents a SCART port.                                                                                                                                                                      |
| `int`                                                              | [TYPE_SVIDEO](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_SVIDEO) TV input type: the TV input service represents a SVIDEO port.                                                                                                                                                                   |
| `int`                                                              | [TYPE_TUNER](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_TUNER) TV input type: the TV input service is a tuner which provides channels.                                                                                                                                                           |
| `int`                                                              | [TYPE_VGA](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_VGA) TV input type: the TV input service represents a VGA port.                                                                                                                                                                            |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ### Inherited constants                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From interface[android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable) |-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `int` | [CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR) Descriptor bit used with[describeContents()](https://developer.android.com/reference/android/os/Parcelable#describeContents()): indicates that the Parcelable object's flattened representation includes a file descriptor.                                                                                                                                            | | `int` | [PARCELABLE_WRITE_RETURN_VALUE](https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE) Flag for use with[writeToParcel(Parcel, int)](https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)): the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". | |

|                                                                                                                                            ### Fields                                                                                                                                            ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|
| ` public static final `[Creator](https://developer.android.com/reference/android/os/Parcelable.Creator)`<`[TvInputInfo](https://developer.android.com/reference/android/media/tv/TvInputInfo)`>` | [CREATOR](https://developer.android.com/reference/android/media/tv/TvInputInfo#CREATOR) <br /> |

|                                                                                                                                                                                                                                ### Public methods                                                                                                                                                                                                                                ||
|-------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` boolean`                                                                                | ` `[canPauseRecording](https://developer.android.com/reference/android/media/tv/TvInputInfo#canPauseRecording())`() ` Returns`true`if this TV input can pause recording TV programs,`false`otherwise.                                                                                                                                                                                 |
| ` boolean`                                                                                | ` `[canRecord](https://developer.android.com/reference/android/media/tv/TvInputInfo#canRecord())`() ` Returns`true`if this TV input can record TV programs,`false`otherwise.                                                                                                                                                                                                          |
| ` `[Intent](https://developer.android.com/reference/android/content/Intent)               | ` `[createSettingsIntent](https://developer.android.com/reference/android/media/tv/TvInputInfo#createSettingsIntent())`() ` *This method was deprecated in API level 26. Use[createSetupIntent()](https://developer.android.com/reference/android/media/tv/TvInputInfo#createSetupIntent())instead. Settings activity is deprecated. Use setup activity instead to provide settings.* |
| ` `[Intent](https://developer.android.com/reference/android/content/Intent)               | ` `[createSetupIntent](https://developer.android.com/reference/android/media/tv/TvInputInfo#createSetupIntent())`() ` Returns an intent to start the setup activity for this TV input.                                                                                                                                                                                                |
| ` int`                                                                                    | ` `[describeContents](https://developer.android.com/reference/android/media/tv/TvInputInfo#describeContents())`() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.                                                                                                                                                           |
| ` boolean`                                                                                | ` `[equals](https://developer.android.com/reference/android/media/tv/TvInputInfo#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` o) ` Indicates whether some other object is "equal to" this one.                                                                                                                                     |
| ` `[Bundle](https://developer.android.com/reference/android/os/Bundle)                    | ` `[getExtras](https://developer.android.com/reference/android/media/tv/TvInputInfo#getExtras())`() ` Returns domain-specific extras associated with this TV input.                                                                                                                                                                                                                   |
| ` `[String](https://developer.android.com/reference/java/lang/String)                     | ` `[getId](https://developer.android.com/reference/android/media/tv/TvInputInfo#getId())`() ` Returns a unique ID for this TV input.                                                                                                                                                                                                                                                  |
| ` `[String](https://developer.android.com/reference/java/lang/String)                     | ` `[getParentId](https://developer.android.com/reference/android/media/tv/TvInputInfo#getParentId())`() ` Returns the parent input ID.                                                                                                                                                                                                                                                |
| ` `[ServiceInfo](https://developer.android.com/reference/android/content/pm/ServiceInfo)  | ` `[getServiceInfo](https://developer.android.com/reference/android/media/tv/TvInputInfo#getServiceInfo())`() ` Returns the information of the service that implements this TV input.                                                                                                                                                                                                 |
| ` int`                                                                                    | ` `[getTunerCount](https://developer.android.com/reference/android/media/tv/TvInputInfo#getTunerCount())`() ` Returns the number of tuners this TV input has.                                                                                                                                                                                                                         |
| ` int`                                                                                    | ` `[getType](https://developer.android.com/reference/android/media/tv/TvInputInfo#getType())`() ` Returns the type of this TV input.                                                                                                                                                                                                                                                  |
| ` int`                                                                                    | ` `[hashCode](https://developer.android.com/reference/android/media/tv/TvInputInfo#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                                                                                                         |
| ` boolean`                                                                                | ` `[isHidden](https://developer.android.com/reference/android/media/tv/TvInputInfo#isHidden(android.content.Context))`(`[Context](https://developer.android.com/reference/android/content/Context)` context) ` Checks if this TV input is marked hidden by the user in the settings.                                                                                                  |
| ` boolean`                                                                                | ` `[isPassthroughInput](https://developer.android.com/reference/android/media/tv/TvInputInfo#isPassthroughInput())`() ` Returns`true`if this TV input is pass-though which does not have any real channels in TvProvider.                                                                                                                                                             |
| ` `[CharSequence](https://developer.android.com/reference/java/lang/CharSequence)         | ` `[loadCustomLabel](https://developer.android.com/reference/android/media/tv/TvInputInfo#loadCustomLabel(android.content.Context))`(`[Context](https://developer.android.com/reference/android/content/Context)` context) ` Loads the custom label set by user in settings.                                                                                                          |
| ` `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable) | ` `[loadIcon](https://developer.android.com/reference/android/media/tv/TvInputInfo#loadIcon(android.content.Context))`(`[Context](https://developer.android.com/reference/android/content/Context)` context) ` Loads the user-displayed icon for this TV input.                                                                                                                       |
| ` `[CharSequence](https://developer.android.com/reference/java/lang/CharSequence)         | ` `[loadLabel](https://developer.android.com/reference/android/media/tv/TvInputInfo#loadLabel(android.content.Context))`(`[Context](https://developer.android.com/reference/android/content/Context)` context) ` Loads the user-displayed label for this TV input.                                                                                                                    |
| ` `[String](https://developer.android.com/reference/java/lang/String)                     | ` `[toString](https://developer.android.com/reference/android/media/tv/TvInputInfo#toString())`() ` Returns a string representation of the object.                                                                                                                                                                                                                                    |
| ` void`                                                                                   | ` `[writeToParcel](https://developer.android.com/reference/android/media/tv/TvInputInfo#writeToParcel(android.os.Parcel,%20int))`(`[Parcel](https://developer.android.com/reference/android/os/Parcel)` dest, int flags) ` Used to package this object into a[Parcel](https://developer.android.com/reference/android/os/Parcel).                                                     |

| ### 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*.                                                                                             | ||
| From interface` `[android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable)` ` |------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract int`  | ` `[describeContents](https://developer.android.com/reference/android/os/Parcelable#describeContents())`() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.                                    | | ` abstract void` | ` `[writeToParcel](https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int))`(`[Parcel](https://developer.android.com/reference/android/os/Parcel)` dest, int flags) ` Flatten this object in to a Parcel. | ||

## Constants

### EXTRA_INPUT_ID

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

```
public static final String EXTRA_INPUT_ID
```

Used as a String extra field in setup intents created by[createSetupIntent()](https://developer.android.com/reference/android/media/tv/TvInputInfo#createSetupIntent())to supply the ID of a specific TV input to set up.

<br />

Constant Value: "android.media.tv.extra.INPUT_ID"  

### TYPE_COMPONENT

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

```
public static final int TYPE_COMPONENT
```

TV input type: the TV input service represents a component port.

<br />

Constant Value: 1004 (0x000003ec)  

### TYPE_COMPOSITE

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

```
public static final int TYPE_COMPOSITE
```

TV input type: the TV input service represents a composite port.

<br />

Constant Value: 1001 (0x000003e9)  

### TYPE_DISPLAY_PORT

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

```
public static final int TYPE_DISPLAY_PORT
```

TV input type: the TV input service represents a display port.

<br />

Constant Value: 1008 (0x000003f0)  

### TYPE_DVI

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

```
public static final int TYPE_DVI
```

TV input type: the TV input service represents a DVI port.

<br />

Constant Value: 1006 (0x000003ee)  

### TYPE_HDMI

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

```
public static final int TYPE_HDMI
```

TV input type: the TV input service is HDMI. (e.g. HDMI 1)

<br />

Constant Value: 1007 (0x000003ef)  

### TYPE_OTHER

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

```
public static final int TYPE_OTHER
```

TV input type: a generic hardware TV input type.

<br />

Constant Value: 1000 (0x000003e8)  

### TYPE_SCART

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

```
public static final int TYPE_SCART
```

TV input type: the TV input service represents a SCART port.

<br />

Constant Value: 1003 (0x000003eb)  

### TYPE_SVIDEO

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

```
public static final int TYPE_SVIDEO
```

TV input type: the TV input service represents a SVIDEO port.

<br />

Constant Value: 1002 (0x000003ea)  

### TYPE_TUNER

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

```
public static final int TYPE_TUNER
```

TV input type: the TV input service is a tuner which provides channels.

<br />

Constant Value: 0 (0x00000000)  

### TYPE_VGA

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

```
public static final int TYPE_VGA
```

TV input type: the TV input service represents a VGA port.

<br />

Constant Value: 1005 (0x000003ed)

## Fields

### CREATOR

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

```
public static final Creator<TvInputInfo> CREATOR
```

<br />

<br />

## Public methods

### canPauseRecording

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

```
public boolean canPauseRecording ()
```

Returns`true`if this TV input can pause recording TV programs,`false`otherwise.

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### canRecord

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

```
public boolean canRecord ()
```

Returns`true`if this TV input can record TV programs,`false`otherwise.

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### createSettingsIntent

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

```
public Intent createSettingsIntent ()
```

<br />

**This method was deprecated in API level 26.**   
Use[createSetupIntent()](https://developer.android.com/reference/android/media/tv/TvInputInfo#createSetupIntent())instead. Settings activity is deprecated. Use setup activity instead to provide settings.

Returns an intent to start the settings activity for this TV input.

<br />

|                                     Returns                                      ||
|--------------------------------------------------------------------------|--------|
| [Intent](https://developer.android.com/reference/android/content/Intent) | <br /> |

### createSetupIntent

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

```
public Intent createSetupIntent ()
```

Returns an intent to start the setup activity for this TV input.

<br />

|                                     Returns                                      ||
|--------------------------------------------------------------------------|--------|
| [Intent](https://developer.android.com/reference/android/content/Intent) | <br /> |

### describeContents

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

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of[writeToParcel(android.os.Parcel, int)](https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)), the return value of this method must include the[CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR)bit.

<br />

|                                                                                                                         Returns                                                                                                                         ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either`0`or[CONTENTS_FILE_DESCRIPTOR](https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR) <br /> |

### equals

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

```
public boolean equals (Object o)
```

Indicates whether some other object is "equal to" this one.

The`equals`method implements an equivalence relation on non-null object references:

- It is*reflexive* : for any non-null reference value`x`,`x.equals(x)`should return`true`.
- It is*symmetric* : for any non-null reference values`x`and`y`,`x.equals(y)`should return`true`if and only if`y.equals(x)`returns`true`.
- It is*transitive* : for any non-null reference values`x`,`y`, and`z`, if`x.equals(y)`returns`true`and`y.equals(z)`returns`true`, then`x.equals(z)`should return`true`.
- It is*consistent* : for any non-null reference values`x`and`y`, multiple invocations of`x.equals(y)`consistently return`true`or consistently return`false`, provided no information used in`equals`comparisons on the objects is modified.
- For any non-null reference value`x`,`x.equals(null)`should return`false`.

An equivalence relation partitions the elements it operates on into*equivalence classes*; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

<br />

|                            Parameters                             ||
|-----|--------------------------------------------------------------|
| `o` | `Object`: the reference object with which to compare. <br /> |

|                                         Returns                                          ||
|-----------|-------------------------------------------------------------------------------|
| `boolean` | `true`if this object is the same as the obj argument;`false`otherwise. <br /> |

### getExtras

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

```
public Bundle getExtras ()
```

Returns domain-specific extras associated with this TV input.

<br />

|                                   Returns                                   ||
|---------------------------------------------------------------------|--------|
| [Bundle](https://developer.android.com/reference/android/os/Bundle) | <br /> |

### getId

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

```
public String getId ()
```

Returns a unique ID for this TV input. The ID is generated from the package and class name implementing the TV input service.

<br />

|                                  Returns                                   ||
|--------------------------------------------------------------------|--------|
| [String](https://developer.android.com/reference/java/lang/String) | <br /> |

### getParentId

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

```
public String getParentId ()
```

Returns the parent input ID.

A TV input may have a parent input if the TV input is actually a logical representation of a device behind the hardware port represented by the parent input. For example, a HDMI CEC logical device, connected to a HDMI port, appears as another TV input. In this case, the parent input of this logical device is the HDMI port.

Applications may group inputs by parent input ID to provide an easier access to inputs sharing the same physical port. In the example of HDMI CEC, logical HDMI CEC devices behind the same HDMI port have the same parent ID, which is the ID representing the port. Thus applications can group the hardware HDMI port and the logical HDMI CEC devices behind it together using this method.

<br />

|                                                                               Returns                                                                                ||
|--------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | the ID of the parent input, if exists. Returns`null`if the parent input is not specified. <br /> |

### getServiceInfo

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

```
public ServiceInfo getServiceInfo ()
```

Returns the information of the service that implements this TV input.

<br />

|                                            Returns                                            ||
|---------------------------------------------------------------------------------------|--------|
| [ServiceInfo](https://developer.android.com/reference/android/content/pm/ServiceInfo) | <br /> |

### getTunerCount

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

```
public int getTunerCount ()
```

Returns the number of tuners this TV input has.

This method is valid only for inputs of type[TYPE_TUNER](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_TUNER). For inputs of other types, it returns 0.

Tuners correspond to physical/logical resources that allow reception of TV signal. Having*N* tuners means that the TV input is capable of receiving*N*different channels concurrently.

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getType

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

```
public int getType ()
```

Returns the type of this TV input.

<br />

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Returns                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ||
|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | Value is[TYPE_TUNER](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_TUNER),[TYPE_OTHER](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_OTHER),[TYPE_COMPOSITE](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_COMPOSITE),[TYPE_SVIDEO](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_SVIDEO),[TYPE_SCART](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_SCART),[TYPE_COMPONENT](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_COMPONENT),[TYPE_VGA](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_VGA),[TYPE_DVI](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_DVI),[TYPE_HDMI](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_HDMI), or[TYPE_DISPLAY_PORT](https://developer.android.com/reference/android/media/tv/TvInputInfo#TYPE_DISPLAY_PORT) <br /> |

### hashCode

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

```
public int hashCode ()
```

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by[HashMap](https://developer.android.com/reference/java/util/HashMap).

The general contract of`hashCode`is:

- Whenever it is invoked on the same object more than once during an execution of a Java application, the`hashCode`method must consistently return the same integer, provided no information used in`equals`comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))method, then calling the`hashCode`method on each of the two objects must produce the same integer result.
- It is*not* required that if two objects are unequal according to the[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))method, then calling the`hashCode`method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

<br />

<br />

|                     Returns                      ||
|-------|-------------------------------------------|
| `int` | a hash code value for this object. <br /> |

### isHidden

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

```
public boolean isHidden (Context context)
```

Checks if this TV input is marked hidden by the user in the settings.

<br />

|                                                                         Parameters                                                                         ||
|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------|
| `context` | `Context`: Supplies a[Context](https://developer.android.com/reference/android/content/Context)used to check if this TV input is hidden. <br /> |

|                                            Returns                                            ||
|-----------|------------------------------------------------------------------------------------|
| `boolean` | `true`if the user marked this TV input hidden in settings.`false`otherwise. <br /> |

### isPassthroughInput

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

```
public boolean isPassthroughInput ()
```

Returns`true`if this TV input is pass-though which does not have any real channels in TvProvider.`false`otherwise.

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

**See also:**

- [TvContract.buildChannelUriForPassthroughInput(String)](https://developer.android.com/reference/android/media/tv/TvContract#buildChannelUriForPassthroughInput(java.lang.String))  

### loadCustomLabel

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

```
public CharSequence loadCustomLabel (Context context)
```

Loads the custom label set by user in settings.

<br />

|                                                                   Parameters                                                                    ||
|-----------|--------------------------------------------------------------------------------------------------------------------------------------|
| `context` | `Context`: Supplies a[Context](https://developer.android.com/reference/android/content/Context)used to load the custom label. <br /> |

|                                                                                     Returns                                                                                     ||
|--------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------|
| [CharSequence](https://developer.android.com/reference/java/lang/CharSequence) | a CharSequence containing the TV input's custom label.`null`if there is no custom label. <br /> |

### loadIcon

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

```
public Drawable loadIcon (Context context)
```

Loads the user-displayed icon for this TV input.

<br />

|                                                                             Parameters                                                                              ||
|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context` | `Context`: Supplies a[Context](https://developer.android.com/reference/android/content/Context)used to load the icon. This value cannot be`null`. <br /> |

|                                                                                                                           Returns                                                                                                                           ||
|----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable) | a Drawable containing the TV input's icon. If the TV input does not have an icon, application's icon is returned. If it's unavailable too,`null`is returned. <br /> |

### loadLabel

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

```
public CharSequence loadLabel (Context context)
```

Loads the user-displayed label for this TV input.

<br />

|                                                                              Parameters                                                                              ||
|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context` | `Context`: Supplies a[Context](https://developer.android.com/reference/android/content/Context)used to load the label. This value cannot be`null`. <br /> |

|                                                                                               Returns                                                                                               ||
|--------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|
| [CharSequence](https://developer.android.com/reference/java/lang/CharSequence) | a CharSequence containing the TV input's label. If the TV input does not have a label, its name is returned. <br /> |

### toString

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

```
public String toString ()
```

Returns a string representation of the object.

<br />

|                                                      Returns                                                      ||
|--------------------------------------------------------------------|-----------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | a string representation of the object. <br /> |

### writeToParcel

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

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Used to package this object into a[Parcel](https://developer.android.com/reference/android/os/Parcel).

<br />

|                                                                 Parameters                                                                 ||
|---------|-----------------------------------------------------------------------------------------------------------------------------------|
| `dest`  | `Parcel`: The[Parcel](https://developer.android.com/reference/android/os/Parcel)to be written. This value cannot be`null`. <br /> |
| `flags` | `int`: The flags used for parceling. <br />                                                                                       |