PreviewChannel.Builder

public static final class PreviewChannel.Builder
extends Object

java.lang.Object
   ↳ androidx.tvprovider.media.tv.PreviewChannel.Builder


This builder makes it easy to create a PreviewChannel object by allowing you to chain setters. Even though this builder provides a no-arg constructor, certain fields are required or the build() method will throw an exception. The required fields are displayName and appLinkIntentUri; use the respective methods to set them.

Summary

Public constructors

Builder()
Builder(PreviewChannel other)

Public methods

PreviewChannel build()

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

PreviewChannel.Builder setAppLinkIntent(Intent appLinkIntent)

When user clicks on this channel's logo, the system will send an Intent for your app to open an Activity with contents relevant to this channel.

PreviewChannel.Builder setAppLinkIntentUri(Uri appLinkIntentUri)

When user clicks on this channel's logo, the system will send an Intent for your app to open an Activity with contents relevant to this channel.

PreviewChannel.Builder setDescription(CharSequence description)

It's good practice to include a general description of the programs in this channel.

PreviewChannel.Builder setDisplayName(CharSequence displayName)

This is the name user sees when your channel appears on their TV home screen.

PreviewChannel.Builder setInternalProviderData(byte[] internalProviderData)

This is one of the optional fields that your app may set.

PreviewChannel.Builder setInternalProviderFlag1(long flag)

This is one of the optional fields that your app may set.

PreviewChannel.Builder setInternalProviderFlag2(long flag)

This is one of the optional fields that your app may set.

PreviewChannel.Builder setInternalProviderFlag3(long flag)

This is one of the optional fields that your app may set.

PreviewChannel.Builder setInternalProviderFlag4(long flag)

This is one of the optional fields that your app may set.

PreviewChannel.Builder setInternalProviderId(String internalProviderId)

It is expected that your app or your server has its own internal representation (i.e.