WatchNextProgram.Builder

public static final class WatchNextProgram.Builder
extends Object

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


This Builder class simplifies the creation of a WatchNextProgram object.

Summary

Public constructors

Builder()

Creates a new Builder object.

Builder(WatchNextProgram other)

Creates a new Builder object with values copied from another Program.

Public methods

WatchNextProgram build()
T extends Builder setAudioLanguages(String[] audioLanguages)

Sets the available audio languages for this program as an array of strings.

T extends Builder setAuthor(String author)

Sets the author or artist of this content.

T extends Builder setAvailability(int availability)

Sets the availability of this TV program.

T extends Builder setCanonicalGenres(String[] genres)

Sets the genres of the program.

T extends Builder setContentId(String contentId)

Sets the content ID for this program.

T extends Builder setContentRatings(TvContentRating[] contentRatings)

Sets the content ratings for this program.

T extends Builder setDescription(String description)

Sets a brief description of the program.

T extends Builder setDurationMillis(int duration)

Sets the last playback duration (in milliseconds) of the preview video.

T extends Builder setEndTimeUtcMillis(long endTime)

Sets the end time of the program (for live programs).

T extends Builder setEpisodeNumber(int episodeNumber)

Sets the episode number in a season for this episode for a series.

T extends Builder setEpisodeNumber(String episodeNumber, int numericalEpisodeNumber)

Sets the episode number in a season for this episode for a series.

T extends Builder setEpisodeTitle(String episodeTitle)

Sets the title of this particular episode for a series.

T extends Builder setGenre(String genre)

Sets the genre for this program.

T extends Builder setId(long programId)

Sets a unique id for this program.

T extends Builder setIntent(Intent intent)

Sets the intent which is launched when the program is selected.

T extends Builder setIntentUri(Uri intentUri)

Sets the intent URI which is launched when the program is selected.

T extends Builder setInteractionCount(long interactionCount)

Sets the interaction count for this program.

T extends Builder setInteractionType(int interactionType)

Sets the type of interaction for this TV program.

T extends Builder setInternalProviderData(byte[] data)

Sets the internal provider data for the program as raw bytes.

T extends Builder setInternalProviderFlag1(long flag)

Sets the internal provider flag1 for the program.

T extends Builder setInternalProviderFlag2(long flag)

Sets the internal provider flag2 for the program.

T extends Builder setInternalProviderFlag3(long flag)

Sets the internal provider flag3 for the program.

T extends Builder setInternalProviderFlag4(long flag)

Sets the internal provider flag4 for the program.

T extends Builder setInternalProviderId(String externalId)

Sets external ID for the program.

T extends Builder setItemCount(int itemCount)

Sets the count of the items included in this TV program.

WatchNextProgram.Builder setLastEngagementTimeUtcMillis(long lastEngagementTimeUtcMillis)

Sets the time when the program is going to begin in milliseconds since the epoch.

T extends Builder setLastPlaybackPositionMillis(int position)

Sets the last playback position (in milliseconds) of the preview video.

T extends Builder setLive(boolean live)

Sets whether this TV program is live or not.

T extends