belongs to Maven artifact com.android.support:support-tv-provider:28.0.0-alpha1
WatchNextProgram.Builder
public
static
final
class
WatchNextProgram.Builder
extends Object
java.lang.Object | |
↳ | android.support.media.tv.WatchNextProgram.Builder |
This Builder class simplifies the creation of a WatchNextProgram
object.
Summary
Public constructors | |
---|---|
WatchNextProgram.Builder()
Creates a new Builder object. |
|
WatchNextProgram.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 Builder
|
setLogoContentDescription(String logoContentDescription)
Sets the logo's content description for this program. |
T extends Builder
|
setLogoUri(Uri logoUri)
Sets the URI for the logo of this TV program. |
T extends Builder
|
setLongDescription(String longDescription)
Sets a longer description of a program if one exists. |
T extends Builder
|
setOfferPrice(String price)
Sets the offer price of this TV program. |
T extends Builder
|
setPosterArtAspectRatio(int ratio)
Sets the aspect ratio of the poster art for this TV program. |
T extends Builder
|
setPosterArtUri(Uri posterArtUri)
Sets the large poster art of the program. |
T extends Builder
|
setPreviewAudioUri(Uri previewAudioUri)
Sets a URI for the preview audio. |
T extends Builder
|
setPreviewVideoUri(Uri previewVideoUri)
Sets a URI for the preview video. |
T extends Builder
|
setReleaseDate(String releaseDate)
Sets the release date of this TV program. |
T extends Builder
|
setReleaseDate(Date releaseDate)
Sets the release date of this TV program. |
T extends Builder
|
setReviewRating(String reviewRating)
Sets the review rating score for this program. |
T extends Builder
|
setReviewRatingStyle(int reviewRatingStyle)
Sets the review rating score style used for |
T extends Builder
|
setSearchable(boolean searchable)
Sets whether this channel can be searched for in other applications. |
T extends Builder
|
setSeasonNumber(String seasonNumber, int numericalSeasonNumber)
Sets the season number for this episode for a series. |
T extends Builder
|
setSeasonNumber(int seasonNumber)
Sets the season number for this episode for a series. |
T extends Builder
|
setSeasonTitle(String seasonTitle)
Sets a custom name for the season, if applicable. |
T extends Builder
|
setStartTimeUtcMillis(long startTime)
Sets the start time of the program (for live programs). |
T extends Builder
|
setStartingPrice(String price)
Sets the starting price of this TV program. |
T extends Builder
|
setThumbnailAspectRatio(int ratio)
Sets the aspect ratio of the thumbnail for this TV program. |
T extends Builder
|
setThumbnailUri(Uri thumbnailUri)
Sets a small thumbnail of the program. |
T extends Builder
|
setTitle(String title)
Sets the title of this program. |
T extends Builder
|
setTransient(boolean transientValue)
Sets whether this program is transient or not. |
T extends Builder
|
setType(int type)
Sets the type of this program content. |
T extends Builder
|
setVideoHeight(int height)
Sets the video height of the program. |
T extends Builder
|
setVideoWidth(int width)
Sets the video width of the program. |
WatchNextProgram.Builder
|
setWatchNextType(int watchNextType)
Sets the "watch next" type of this program content. |
Inherited methods | |
---|---|
![]()
java.lang.Object
|
Public constructors
WatchNextProgram.Builder
WatchNextProgram.Builder ()
Creates a new Builder object.
WatchNextProgram.Builder
WatchNextProgram.Builder (WatchNextProgram other)
Creates a new Builder object with values copied from another Program.
Parameters | |
---|---|
other |
WatchNextProgram : The Program you're copying from.
|
Public methods
build
WatchNextProgram build ()
Returns | |
---|---|
WatchNextProgram |
A new Program with values supplied by the Builder. |
setAudioLanguages
T extends Builder setAudioLanguages (String[] audioLanguages)
Sets the available audio languages for this program as an array of strings.
Parameters | |
---|---|
audioLanguages |
String : An array of audio languages, in ISO 639-1 or 639-2/T codes, that
apply to this program which will be stored in a database. |
Returns | |
---|---|
T extends Builder |
This Builder object to allow for chaining of calls to builder methods. |
setAuthor
T extends Builder setAuthor (String author)
Sets the author or artist of this content.
Parameters | |
---|---|
author |
String : The author of the program. |
Returns | |
---|---|
T extends Builder |
This Builder object to allow for chaining of calls to builder methods. |
See also:
setAvailability
T extends Builder setAvailability (int availability)
Sets the availability of this TV program.
The value should match one of the followings:
.PreviewPrograms#AVAILABILITY_AVAILABLE
,
.PreviewPrograms#AVAILABILITY_FREE_WITH_SUBSCRIPTION
,
.PreviewPrograms#AVAILABILITY_PAID_CONTENT
,
.PreviewPrograms#AVAILABILITY_PURCHASED
, and
.PreviewPrograms#AVAILABILITY_FREE
.
Parameters | |
---|---|
availability |
int : The availability of the program. |
Returns | |
---|---|
|