Added in API level 24

Builder

class Builder
kotlin.Any
   ↳ android.media.tv.TvInputInfo.Builder

A convenience builder for creating TvInputInfo objects.

Summary

Public constructors
Builder(context: Context!, component: ComponentName!)

Constructs a new builder for TvInputInfo.

Public methods
TvInputInfo!

Creates a TvInputInfo instance with the specified fields.

TvInputInfo.Builder
setCanPauseRecording(canPauseRecording: Boolean)

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

TvInputInfo.Builder!
setCanRecord(canRecord: Boolean)

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

TvInputInfo.Builder!
setExtras(extras: Bundle!)

Sets domain-specific extras associated with this TV input.

TvInputInfo.Builder!
setTunerCount(tunerCount: Int)

Sets the tuner count.

Public constructors

Builder

Added in API level 24
Builder(
    context: Context!,
    component: ComponentName!)

Constructs a new builder for TvInputInfo.

Parameters
context Context!: A Context of the application package implementing this class.
component ComponentName!: The name of the application component to be used for the TvInputService.

Public methods

build

Added in API level 24
fun build(): TvInputInfo!

Creates a TvInputInfo instance with the specified fields. Most of the information is obtained by parsing the AndroidManifest and TvInputService#SERVICE_META_DATA for the TvInputService this TV input implements.

Return
TvInputInfo! TvInputInfo containing information about this TV input.

setCanPauseRecording

Added in API level 31
fun setCanPauseRecording(canPauseRecording: Boolean): TvInputInfo.Builder

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

Parameters
canPauseRecording Boolean: Whether this TV input can pause recording TV programs.
Return
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
fun setCanRecord(canRecord: Boolean): TvInputInfo.Builder!

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

Parameters
canRecord Boolean: Whether this TV input can record TV programs.
Return
TvInputInfo.Builder! This Builder object to allow for chaining of calls to builder methods.

setExtras

Added in API level 24
fun setExtras(extras: Bundle!): TvInputInfo.Builder!

Sets domain-specific extras associated with this TV input.

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.
Return
TvInputInfo.Builder! This Builder object to allow for chaining of calls to builder methods.

setTunerCount

Added in API level 24
fun setTunerCount(tunerCount: Int): TvInputInfo.Builder!

Sets the tuner count. Valid only for TYPE_TUNER.

Parameters
tunerCount Int: The number of tuners this TV input has.
Return
TvInputInfo.Builder! This Builder object to allow for chaining of calls to builder methods.