public final class

Channel.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.tvprovider.media.tv.Channel.Builder

Overview

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

Summary

Constructors
publicBuilder()

publicBuilder(Channel other)

Methods
public Channelbuild()

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

public Channel.BuildersetAppLinkColor(int appLinkColor)

Sets the background color of the App Linking card.

public Channel.BuildersetAppLinkIconUri(Uri appLinkIconUri)

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

public Channel.BuildersetAppLinkIntent(Intent appLinkIntent)

Sets the App Linking Intent.

public Channel.BuildersetAppLinkIntentUri(Uri appLinkIntentUri)

Sets the App Linking Intent.

public Channel.BuildersetAppLinkPosterArtUri(Uri appLinkPosterArtUri)

Sets the background image of the App Linking card.

public Channel.BuildersetAppLinkText(java.lang.String appLinkText)

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

public Channel.BuildersetBrowsable(boolean value)

Sets whether this channel is browsable or not.

public Channel.BuildersetConfigurationDisplayOrder(int value)

Sets the configuration display order for this channel.

public Channel.BuildersetDescription(java.lang.String description)

Sets the description of the Channel.

public Channel.BuildersetDisplayName(java.lang.String displayName)

Sets the name to be displayed for the Channel.

public Channel.BuildersetDisplayNumber(java.lang.String displayNumber)

Sets the display number of the Channel.

public Channel.BuildersetGlobalContentId(java.lang.String value)

Sets the global content ID for this channel.

public Channel.BuildersetInputId(java.lang.String inputId)

Sets the input id of the Channel.

public Channel.BuildersetInternalProviderData(byte[] internalProviderData[])

Sets the internal provider data of the channel.

public Channel.BuildersetInternalProviderData(java.lang.String internalProviderData)

Sets the internal provider data of the channel.

public Channel.BuildersetInternalProviderFlag1(long flag)

Sets the internal provider flag1 for the channel.

public Channel.BuildersetInternalProviderFlag2(long flag)

Sets the internal provider flag2 for the channel.

public Channel.BuildersetInternalProviderFlag3(long flag)

Sets the internal provider flag3 for the channel.

public Channel.BuildersetInternalProviderFlag4(long flag)

Sets the internal provider flag4 for the channel.

public Channel.BuildersetInternalProviderId(java.lang.String internalProviderId)

Sets the internal provider ID for the channel.

public Channel.BuildersetLocked(boolean value)

Sets whether this channel is locked or not.

public Channel.BuildersetNetworkAffiliation(java.lang.String networkAffiliation)

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

public Channel.BuildersetOriginalNetworkId(int originalNetworkId)

Sets the original network id of the Channel.

public Channel.BuildersetSearchable(boolean searchable)

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

public Channel.BuildersetServiceId(int serviceId)

Sets the service id of the Channel.

public Channel.BuildersetServiceType(java.lang.String serviceType)

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

public Channel.BuildersetSystemApproved(boolean value)

Sets whether system approved this channel or not.

public Channel.BuildersetSystemChannelKey(java.lang.String value)

Sets the system channel key for this channel.

public Channel.BuildersetTransient(boolean value)

Sets whether this channel is transient or not.

public Channel.BuildersetTransportStreamId(int transportStreamId)

Sets the transport stream id of the Channel.

public Channel.BuildersetType(java.lang.String type)

Sets the broadcast standard of the Channel.

public Channel.BuildersetVideoFormat(java.lang.String videoFormat)

Sets the video format of the Channel.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

public Builder(Channel other)

Methods

public Channel.Builder setInputId(java.lang.String inputId)

Sets the input id of the Channel.

Parameters:

inputId: The value of TvContractCompat.Channels.COLUMN_INPUT_ID for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setType(java.lang.String type)

Sets the broadcast standard of the Channel.

Parameters:

type: The value of TvContractCompat.Channels.COLUMN_TYPE for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setDisplayNumber(java.lang.String displayNumber)

Sets the display number of the Channel.

Parameters:

displayNumber: The value of TvContractCompat.Channels.COLUMN_DISPLAY_NUMBER for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setDisplayName(java.lang.String displayName)

Sets the name to be displayed for the Channel.

Parameters:

displayName: The value of TvContractCompat.Channels.COLUMN_DISPLAY_NAME for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setDescription(java.lang.String description)

Sets the description of the Channel.

Parameters:

description: The value of TvContractCompat.Channels.COLUMN_DESCRIPTION for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setVideoFormat(java.lang.String videoFormat)

Sets the video format of the Channel.

Parameters:

videoFormat: The value of TvContractCompat.Channels.COLUMN_VIDEO_FORMAT for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setOriginalNetworkId(int originalNetworkId)

Sets the original network id of the Channel.

Parameters:

originalNetworkId: The value of TvContractCompat.Channels.COLUMN_ORIGINAL_NETWORK_ID for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setTransportStreamId(int transportStreamId)

Sets the transport stream id of the Channel.

Parameters:

transportStreamId: The value of TvContractCompat.Channels.COLUMN_TRANSPORT_STREAM_ID for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setServiceId(int serviceId)

Sets the service id of the Channel.

Parameters:

serviceId: The value of TvContractCompat.Channels.COLUMN_SERVICE_ID for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setInternalProviderData(byte[] internalProviderData[])

Sets the internal provider data of the channel.

Parameters:

internalProviderData: The value of TvContractCompat.Channels.COLUMN_INTERNAL_PROVIDER_DATA for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setInternalProviderData(java.lang.String internalProviderData)

Sets the internal provider data of the channel.

Parameters:

internalProviderData: The value of TvContractCompat.Channels.COLUMN_INTERNAL_PROVIDER_DATA for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setAppLinkText(java.lang.String appLinkText)

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

Parameters:

appLinkText: The value of TvContractCompat.Channels.COLUMN_APP_LINK_TEXT for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setAppLinkColor(int appLinkColor)

Sets the background color of the App Linking card.

Parameters:

appLinkColor: The value of TvContractCompat.Channels.COLUMN_APP_LINK_COLOR for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setAppLinkIconUri(Uri appLinkIconUri)

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

Parameters:

appLinkIconUri: The value of TvContractCompat.Channels.COLUMN_APP_LINK_ICON_URI for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setAppLinkPosterArtUri(Uri appLinkPosterArtUri)

Sets the background image of the App Linking card.

Parameters:

appLinkPosterArtUri: The value of TvContractCompat.Channels.COLUMN_APP_LINK_POSTER_ART_URI for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setAppLinkIntent(Intent appLinkIntent)

Sets the App Linking Intent.

Parameters:

appLinkIntent: The Intent to be executed when the App Linking card is selected

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setAppLinkIntentUri(Uri appLinkIntentUri)

Sets the App Linking Intent.

Parameters:

appLinkIntentUri: 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 TvContractCompat.Channels.COLUMN_APP_LINK_INTENT_URI.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setNetworkAffiliation(java.lang.String networkAffiliation)

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

Parameters:

networkAffiliation: The value of TvContractCompat.Channels.COLUMN_NETWORK_AFFILIATION for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setSearchable(boolean searchable)

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

Parameters:

searchable: The value of TvContractCompat.Channels.COLUMN_SEARCHABLE for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setServiceType(java.lang.String serviceType)

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

Parameters:

serviceType: The value of TvContractCompat.Channels.COLUMN_SERVICE_TYPE for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setInternalProviderFlag1(long flag)

Sets the internal provider flag1 for the channel.

Parameters:

flag: The value of TvContractCompat.Channels.COLUMN_INTERNAL_PROVIDER_FLAG1 for the program.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setInternalProviderFlag2(long flag)

Sets the internal provider flag2 for the channel.

Parameters:

flag: The value of TvContractCompat.Channels.COLUMN_INTERNAL_PROVIDER_FLAG2 for the program.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setInternalProviderFlag3(long flag)

Sets the internal provider flag3 for the channel.

Parameters:

flag: The value of TvContractCompat.Channels.COLUMN_INTERNAL_PROVIDER_FLAG3 for the program.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setInternalProviderFlag4(long flag)

Sets the internal provider flag4 for the channel.

Parameters:

flag: The value of TvContractCompat.Channels.COLUMN_INTERNAL_PROVIDER_FLAG4 for the program.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setInternalProviderId(java.lang.String internalProviderId)

Sets the internal provider ID for the channel.

Parameters:

internalProviderId: The value of TvContractCompat.Channels.COLUMN_INTERNAL_PROVIDER_ID for the program.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setTransient(boolean value)

Sets whether this channel is transient or not.

Parameters:

value: The value of TvContractCompat.Channels.COLUMN_TRANSIENT for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setBrowsable(boolean value)

Sets whether this channel is browsable or not.

Parameters:

value: The value of TvContractCompat.Channels.COLUMN_BROWSABLE for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setSystemApproved(boolean value)

Sets whether system approved this channel or not.

Parameters:

value: The value of TvContractCompat.Channels.COLUMN_SYSTEM_APPROVED for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setConfigurationDisplayOrder(int value)

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

Parameters:

value: The value of TvContractCompat.Channels.COLUMN_CONFIGURATION_DISPLAY_ORDER for the channel

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setSystemChannelKey(java.lang.String value)

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: The value of TvContractCompat.Channels.COLUMN_SYSTEM_CHANNEL_KEY for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setGlobalContentId(java.lang.String value)

Sets the global content ID for this channel.

Parameters:

value: The value of TvContractCompat.Channels.COLUMN_GLOBAL_CONTENT_ID for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel.Builder setLocked(boolean value)

Sets whether this channel is locked or not.

Parameters:

value: The value of TvContractCompat.Channels.COLUMN_LOCKED for the channel.

Returns:

This Builder object to allow for chaining of calls to builder methods.

public Channel build()

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

Returns:

Channel object with values from the Builder.