Register now for Android Dev Summit 2019!

Builder

class Builder
kotlin.Any
   ↳ androidx.tvprovider.media.tv.Channel.Builder

The builder class that makes it easy to chain setters to create a Channel object.

Summary

Public constructors

<init>(other: Channel!)

Public methods

Channel!

Takes the values of the Builder object and creates a Channel object.

Channel.Builder!
setAppLinkColor(appLinkColor: Int)

Sets the background color of the App Linking card.

Channel.Builder!
setAppLinkIconUri(appLinkIconUri: Uri!)

Sets the icon to be displayed next to the text of the App Linking card.

Channel.Builder!
setAppLinkIntent(appLinkIntent: Intent!)

Sets the App Linking Intent.

Channel.Builder!
setAppLinkIntentUri(appLinkIntentUri: Uri!)

Sets the App Linking Intent.

Channel.Builder!
setAppLinkPosterArtUri(appLinkPosterArtUri: Uri!)

Sets the background image of the App Linking card.

Channel.Builder!
setAppLinkText(appLinkText: String!)

Sets the text to be displayed in the App Linking card.

Channel.Builder!

Sets the configuration display order for this channel.

Channel.Builder!
setDescription(description: String!)

Sets the description of the Channel.

Channel.Builder!
setDisplayName(displayName: String!)

Sets the name to be displayed for the Channel.

Channel.Builder!
setDisplayNumber(displayNumber: String!)

Sets the display number of the Channel.

Channel.Builder!
setInputId(inputId: String!)

Sets the input id of the Channel.

Channel.Builder!
setInternalProviderData(internalProviderData: ByteArray!)

Sets the internal provider data of the channel.

Channel.Builder!
setInternalProviderData(internalProviderData: String!)

Sets the internal provider data of the channel.

Channel.Builder!

Sets the internal provider flag1 for the channel.

Channel.Builder!

Sets the internal provider flag2 for the channel.

Channel.Builder!

Sets the internal provider flag3 for the channel.

Channel.Builder!

Sets the internal provider flag4 for the channel.

Channel.Builder!
setInternalProviderId(internalProviderId: String!)

Sets the internal provider ID for the channel.

Channel.Builder!
setNetworkAffiliation(networkAffiliation: String!)

Sets the network name for the channel, which may be different from its display name.

Channel.Builder!
setOriginalNetworkId(originalNetworkId: Int)

Sets the original network id of the Channel.

Channel.Builder!
setSearchable(searchable: Boolean)

Sets whether this channel can be searched for in other applications.

Channel.Builder!
setServiceId(serviceId: Int)

Sets the service id of the Channel.

Channel.Builder!
setServiceType(serviceType: String!)

Sets the type of content that will appear on this channel.

Channel.Builder!

Sets the system channel key for this channel.

Channel.Builder!

Sets whether this channel is transient or not.

Channel.Builder!
setTransportStreamId(transportStreamId: Int)

Sets the transport stream id of the Channel.

Channel.Builder!
setType(type: String!)

Sets the broadcast standard of the Channel.

Channel.Builder!
setVideoFormat(videoFormat: String!)

Sets the video format of the Channel.

Public constructors

<init>

Builder()

<init>

Builder(other: Channel!)

Public methods

build

fun build(): Channel!

Takes the values of the Builder object and creates a Channel object.

Return
Channel!: Channel object with values from the Builder.

setAppLinkColor

fun setAppLinkColor(appLinkColor: Int): Channel.Builder!

Sets the background color of the App Linking card.

Parameters
appLinkColor Int: The value of Channels#COLUMN_APP_LINK_COLOR for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setAppLinkIconUri

fun setAppLinkIconUri(appLinkIconUri: Uri!): Channel.Builder!

Sets the icon to be displayed next to the text of the App Linking card.

Parameters
appLinkIconUri Uri!: The value of Channels#COLUMN_APP_LINK_ICON_URI for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setAppLinkIntent

fun setAppLinkIntent(appLinkIntent: Intent!): Channel.Builder!

Sets the App Linking Intent.

Parameters
appLinkIntent Intent!: The Intent to be executed when the App Linking card is selected
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setAppLinkIntentUri

fun setAppLinkIntentUri(appLinkIntentUri: Uri!): Channel.Builder!

Sets the App Linking Intent.

Parameters
appLinkIntentUri Uri!: The Intent that should be executed when the App Linking card is selected. Use the method toUri(Intent.URI_INTENT_SCHEME) on your Intent to turn it into a String. See Channels#COLUMN_APP_LINK_INTENT_URI.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setAppLinkPosterArtUri

fun setAppLinkPosterArtUri(appLinkPosterArtUri: Uri!): Channel.Builder!

Sets the background image of the App Linking card.

Parameters
appLinkPosterArtUri Uri!: The value of Channels#COLUMN_APP_LINK_POSTER_ART_URI for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setAppLinkText

fun setAppLinkText(appLinkText: String!): Channel.Builder!

Sets the text to be displayed in the App Linking card.

Parameters
appLinkText String!: The value of Channels#COLUMN_APP_LINK_TEXT for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setConfigurationDisplayOrder

fun setConfigurationDisplayOrder(value: Int): Channel.Builder!

Sets the configuration display order for this channel. This value will be used to order channels within the configure channels menu.

Parameters
value Int: The value of Channels#COLUMN_CONFIGURATION_DISPLAY_ORDER for the channel
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setDescription

fun setDescription(description: String!): Channel.Builder!

Sets the description of the Channel.

Parameters
description String!: The value of Channels#COLUMN_DESCRIPTION for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setDisplayName

fun setDisplayName(displayName: String!): Channel.Builder!

Sets the name to be displayed for the Channel.

Parameters
displayName String!: The value of Channels#COLUMN_DISPLAY_NAME for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setDisplayNumber

fun setDisplayNumber(displayNumber: String!): Channel.Builder!

Sets the display number of the Channel.

Parameters
displayNumber String!: The value of Channels#COLUMN_DISPLAY_NUMBER for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setInputId

fun setInputId(inputId: String!): Channel.Builder!

Sets the input id of the Channel.

Parameters
inputId String!: The value of Channels#COLUMN_INPUT_ID for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setInternalProviderData

fun setInternalProviderData(internalProviderData: ByteArray!): Channel.Builder!

Sets the internal provider data of the channel.

Parameters
internalProviderData ByteArray!: The value of Channels#COLUMN_INTERNAL_PROVIDER_DATA for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setInternalProviderData

fun setInternalProviderData(internalProviderData: String!): Channel.Builder!

Sets the internal provider data of the channel.

Parameters
internalProviderData String!: The value of Channels#COLUMN_INTERNAL_PROVIDER_DATA for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setInternalProviderFlag1

fun setInternalProviderFlag1(flag: Long): Channel.Builder!

Sets the internal provider flag1 for the channel.

Parameters
flag Long: The value of Channels#COLUMN_INTERNAL_PROVIDER_FLAG1 for the program.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setInternalProviderFlag2

fun setInternalProviderFlag2(flag: Long): Channel.Builder!

Sets the internal provider flag2 for the channel.

Parameters
flag Long: The value of Channels#COLUMN_INTERNAL_PROVIDER_FLAG2 for the program.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setInternalProviderFlag3

fun setInternalProviderFlag3(flag: Long): Channel.Builder!

Sets the internal provider flag3 for the channel.

Parameters
flag Long: The value of Channels#COLUMN_INTERNAL_PROVIDER_FLAG3 for the program.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setInternalProviderFlag4

fun setInternalProviderFlag4(flag: Long): Channel.Builder!

Sets the internal provider flag4 for the channel.

Parameters
flag Long: The value of Channels#COLUMN_INTERNAL_PROVIDER_FLAG4 for the program.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setInternalProviderId

fun setInternalProviderId(internalProviderId: String!): Channel.Builder!

Sets the internal provider ID for the channel.

Parameters
internalProviderId String!: The value of Channels#COLUMN_INTERNAL_PROVIDER_ID for the program.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setNetworkAffiliation

fun setNetworkAffiliation(networkAffiliation: String!): Channel.Builder!

Sets the network name for the channel, which may be different from its display name.

Parameters
networkAffiliation String!: The value of Channels#COLUMN_NETWORK_AFFILIATION for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setOriginalNetworkId

fun setOriginalNetworkId(originalNetworkId: Int): Channel.Builder!

Sets the original network id of the Channel.

Parameters
originalNetworkId Int: The value of Channels#COLUMN_ORIGINAL_NETWORK_ID for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setSearchable

fun setSearchable(searchable: Boolean): Channel.Builder!

Sets whether this channel can be searched for in other applications.

Parameters
searchable Boolean: The value of Channels#COLUMN_SEARCHABLE for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setServiceId

fun setServiceId(serviceId: Int): Channel.Builder!

Sets the service id of the Channel.

Parameters
serviceId Int: The value of Channels#COLUMN_SERVICE_ID for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setServiceType

fun setServiceType(serviceType: String!): Channel.Builder!

Sets the type of content that will appear on this channel. This could refer to the underlying broadcast standard or refer to Channels#SERVICE_TYPE_AUDIO, Channels#SERVICE_TYPE_AUDIO_VIDEO, or Channels#SERVICE_TYPE_OTHER.

Parameters
serviceType String!: The value of Channels#COLUMN_SERVICE_TYPE for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setSystemChannelKey

fun setSystemChannelKey(value: String!): Channel.Builder!

Sets the system channel key for this channel. This identifier helps OEM differentiate among the app's channels. This identifier should be unique per channel for each app, and should be agreed between the app and the OEM. It is up to the OEM on how they use this identifier for customization purposes.

Parameters
value String!: The value of Channels#COLUMN_SYSTEM_CHANNEL_KEY for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setTransient

fun setTransient(value: Boolean): Channel.Builder!

Sets whether this channel is transient or not.

Parameters
value Boolean: The value of Channels#COLUMN_TRANSIENT for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setTransportStreamId

fun setTransportStreamId(transportStreamId: Int): Channel.Builder!

Sets the transport stream id of the Channel.

Parameters
transportStreamId Int: The value of Channels#COLUMN_TRANSPORT_STREAM_ID for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setType

fun setType(type: String!): Channel.Builder!

Sets the broadcast standard of the Channel.

Parameters
type String!: The value of Channels#COLUMN_TYPE for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.

setVideoFormat

fun setVideoFormat(videoFormat: String!): Channel.Builder!

Sets the video format of the Channel.

Parameters
videoFormat String!: The value of Channels#COLUMN_VIDEO_FORMAT for the channel.
Return
Channel.Builder!: This Builder object to allow for chaining of calls to builder methods.