Channel.Builder
public final class Channel.Builder
The builder class that makes it easy to chain setters to create a Channel object.
Summary
Public methods |
|
|---|---|
Channel |
build()Takes the values of the Builder object and creates a Channel object. |
Channel.Builder |
setAppLinkColor(int appLinkColor)Sets the background color of the App Linking card. |
Channel.Builder |
setAppLinkIconUri(Uri appLinkIconUri)Sets the icon to be displayed next to the text of the App Linking card. |
Channel.Builder |
setAppLinkIntent(Intent appLinkIntent)Sets the App Linking Intent. |
Channel.Builder |
setAppLinkIntentUri(Uri appLinkIntentUri)Sets the App Linking Intent. |
Channel.Builder |
setAppLinkPosterArtUri(Uri appLinkPosterArtUri)Sets the background image of the App Linking card. |
Channel.Builder |
setAppLinkText(String appLinkText)Sets the text to be displayed in the App Linking card. |
Channel.Builder |
setConfigurationDisplayOrder(int value)Sets the configuration display order for this channel. |
Channel.Builder |
setDescription(String description)Sets the description of the Channel. |
Channel.Builder |
setDisplayName(String displayName)Sets the name to be displayed for the Channel. |
Channel.Builder |
setDisplayNumber(String displayNumber)Sets the display number of the Channel. |
@NonNull Channel.Builder |
setGlobalContentId(@NonNull String value)Sets the global content ID for this channel. |
Channel.Builder |
setInputId(String inputId)Sets the input id of the Channel. |
Channel.Builder |
setInternalProviderData(byte[] internalProviderData)Sets the internal provider data of the channel. |
Channel.Builder |
setInternalProviderData(String internalProviderData)Sets the internal provider data of the channel. |
Channel.Builder |
setInternalProviderFlag1(long flag)Sets the internal provider flag1 for the channel. |
Channel.Builder |
setInternalProviderFlag2(long flag)Sets the internal provider flag2 for the channel. |
Channel.Builder |
setInternalProviderFlag3(long flag)Sets the internal provider flag3 for the channel. |
Channel.Builder |
setInternalProviderFlag4(long flag)Sets the internal provider flag4 for the channel. |
Channel.Builder |
setInternalProviderId(String internalProviderId)Sets the internal provider ID for the channel. |
Channel.Builder |
setNetworkAffiliation(String networkAffiliation)Sets the network name for the channel, which may be different from its display name. |
Channel.Builder |
setOriginalNetworkId(int originalNetworkId)Sets the original network id of the Channel. |
Channel.Builder |
setSearchable(boolean searchable)Sets whether this channel can be searched for in other applications. |
Channel.Builder |
setServiceId(int serviceId)Sets the service id of the Channel. |
Channel.Builder |
setServiceType(String serviceType)Sets the type of content that will appear on this channel. |
Channel.Builder |
setSystemChannelKey(String value)Sets the system channel key for this channel. |
Channel.Builder |
setTransient(boolean value)Sets whether this channel is transient or not. |
Channel.Builder |
setTransportStreamId(int transportStreamId)Sets the transport stream id of the Channel. |
Channel.Builder |
Sets the broadcast standard of the Channel. |
Channel.Builder |
setVideoFormat(String videoFormat)Sets the video format of the Channel. |
Public constructors
Public methods
build
public Channel build()
Takes the values of the Builder object and creates a Channel object.
| Returns | |
|---|---|
Channel |
Channel object with values from the Builder. |
setAppLinkColor
public Channel.Builder setAppLinkColor(int appLinkColor)
Sets the background color of the App Linking card.
| Parameters | |
|---|---|
int appLinkColor |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setAppLinkIconUri
public Channel.Builder setAppLinkIconUri(Uri appLinkIconUri)
Sets the icon to be displayed next to the text of the App Linking card.
| Parameters | |
|---|---|
Uri appLinkIconUri |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setAppLinkIntent
public Channel.Builder setAppLinkIntent(Intent appLinkIntent)
Sets the App Linking Intent.
| Parameters | |
|---|---|
Intent appLinkIntent |
The Intent to be executed when the App Linking card is selected |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setAppLinkIntentUri
public Channel.Builder setAppLinkIntentUri(Uri appLinkIntentUri)
Sets the App Linking Intent.
| Parameters | |
|---|---|
Uri 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 |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setAppLinkPosterArtUri
public Channel.Builder setAppLinkPosterArtUri(Uri appLinkPosterArtUri)
Sets the background image of the App Linking card.
| Parameters | |
|---|---|
Uri appLinkPosterArtUri |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setAppLinkText
public Channel.Builder setAppLinkText(String appLinkText)
Sets the text to be displayed in the App Linking card.
| Parameters | |
|---|---|
String appLinkText |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setConfigurationDisplayOrder
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 | |
|---|---|
int value |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setDescription
public Channel.Builder setDescription(String description)
Sets the description of the Channel.
| Parameters | |
|---|---|
String description |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setDisplayName
public Channel.Builder setDisplayName(String displayName)
Sets the name to be displayed for the Channel.
| Parameters | |
|---|---|
String displayName |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setDisplayNumber
public Channel.Builder setDisplayNumber(String displayNumber)
Sets the display number of the Channel.
| Parameters | |
|---|---|
String displayNumber |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setGlobalContentId
public @NonNull Channel.Builder setGlobalContentId(@NonNull String value)
Sets the global content ID for this channel.
| Parameters | |
|---|---|
@NonNull String value |
The value of |
| Returns | |
|---|---|
@NonNull Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setInputId
public Channel.Builder setInputId(String inputId)
Sets the input id of the Channel.
| Parameters | |
|---|---|
String inputId |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setInternalProviderData
public Channel.Builder setInternalProviderData(byte[] internalProviderData)
Sets the internal provider data of the channel.
| Parameters | |
|---|---|
byte[] internalProviderData |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setInternalProviderData
public Channel.Builder setInternalProviderData(String internalProviderData)
Sets the internal provider data of the channel.
| Parameters | |
|---|---|
String internalProviderData |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setInternalProviderFlag1
public Channel.Builder setInternalProviderFlag1(long flag)
Sets the internal provider flag1 for the channel.
| Parameters | |
|---|---|
long flag |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setInternalProviderFlag2
public Channel.Builder setInternalProviderFlag2(long flag)
Sets the internal provider flag2 for the channel.
| Parameters | |
|---|---|
long flag |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setInternalProviderFlag3
public Channel.Builder setInternalProviderFlag3(long flag)
Sets the internal provider flag3 for the channel.
| Parameters | |
|---|---|
long flag |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setInternalProviderFlag4
public Channel.Builder setInternalProviderFlag4(long flag)
Sets the internal provider flag4 for the channel.
| Parameters | |
|---|---|
long flag |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setInternalProviderId
public Channel.Builder setInternalProviderId(String internalProviderId)
Sets the internal provider ID for the channel.
| Parameters | |
|---|---|
String internalProviderId |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setNetworkAffiliation
public Channel.Builder setNetworkAffiliation(String networkAffiliation)
Sets the network name for the channel, which may be different from its display name.
| Parameters | |
|---|---|
String networkAffiliation |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setOriginalNetworkId
public Channel.Builder setOriginalNetworkId(int originalNetworkId)
Sets the original network id of the Channel.
| Parameters | |
|---|---|
int originalNetworkId |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setSearchable
public Channel.Builder setSearchable(boolean searchable)
Sets whether this channel can be searched for in other applications.
| Parameters | |
|---|---|
boolean searchable |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setServiceId
public Channel.Builder setServiceId(int serviceId)
Sets the service id of the Channel.
| Parameters | |
|---|---|
int serviceId |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setServiceType
public Channel.Builder setServiceType(String serviceType)
Sets the type of content that will appear on this channel. This could refer to the underlying broadcast standard or refer to SERVICE_TYPE_AUDIO, SERVICE_TYPE_AUDIO_VIDEO, or SERVICE_TYPE_OTHER.
| Parameters | |
|---|---|
String serviceType |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setSystemChannelKey
public Channel.Builder setSystemChannelKey(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 | |
|---|---|
String value |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setTransient
public Channel.Builder setTransient(boolean value)
Sets whether this channel is transient or not.
| Parameters | |
|---|---|
boolean value |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setTransportStreamId
public Channel.Builder setTransportStreamId(int transportStreamId)
Sets the transport stream id of the Channel.
| Parameters | |
|---|---|
int transportStreamId |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setType
public Channel.Builder setType(String type)
Sets the broadcast standard of the Channel.
| Parameters | |
|---|---|
String type |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setVideoFormat
public Channel.Builder setVideoFormat(String videoFormat)
Sets the video format of the Channel.
| Parameters | |
|---|---|
String videoFormat |
The value of |
| Returns | |
|---|---|
Channel.Builder |
This Builder object to allow for chaining of calls to builder methods. |