belongs to Maven artifact com.android.support:support-tv-provider:28.0.0-alpha1
Program.Builder
public
static
class
Program.Builder
extends Object
java.lang.Object | |
↳ | android.support.media.tv.Program.Builder |
This Builder class simplifies the creation of a Program
object.
Summary
Public constructors | |
---|---|
Program.Builder()
Creates a new Builder object. |
|
Program.Builder(Program other)
Creates a new Builder object with values copied from another Program. |
Public methods | |
---|---|
Program
|
build()
|
T extends Builder
|
setAudioLanguages(String[] audioLanguages)
Sets the available audio languages for this program as an array of strings. |
Program.Builder
|
setBroadcastGenres(String[] genres)
Sets the broadcast-specified genres of the program. |
T extends Builder
|
setCanonicalGenres(String[] genres)
Sets the genres of the program. |
Program.Builder
|
setChannelId(long channelId)
Sets the ID of the |
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. |
Program.Builder
|
setEndTimeUtcMillis(long endTimeUtcMillis)
Sets the time when this program is going to end in milliseconds since the epoch. |
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
|
setId(long programId)
Sets a unique id for this 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
|
setLongDescription(String longDescription)
Sets a longer description of a program if one exists. |
T extends Builder
|
setPosterArtUri(Uri posterArtUri)
Sets the large poster art of the program. |
Program.Builder
|
setRecordingProhibited(boolean prohibited)
Sets whether this program cannot be recorded. |
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. |
Program.Builder
|
setStartTimeUtcMillis(long startTimeUtcMillis)
Sets the time when the program is going to begin in milliseconds since the epoch. |
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
|
setVideoHeight(int height)
Sets the video height of the program. |
T extends Builder
|
setVideoWidth(int width)
Sets the video width of the program. |
Inherited methods | |
---|---|
![]()
java.lang.Object
|
Public constructors
Program.Builder
Program.Builder (Program other)
Creates a new Builder object with values copied from another Program.
Parameters | |
---|---|
other |
Program : The Program you're copying from.
|
Public methods
build
Program build ()
Returns | |
---|---|
Program |
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. |
setBroadcastGenres
Program.Builder setBroadcastGenres (String[] genres)
Sets the broadcast-specified genres of the program.
Parameters | |
---|---|
genres |
String : Array of genres that apply to the program based on the broadcast standard
which will be flattened to a String to store in a database. |
Returns | |
---|---|
Program.Builder |
This Builder object to allow for chaining of calls to builder methods. |
See also:
setCanonicalGenres
T extends Builder setCanonicalGenres (String[] genres)
Sets the genres of the program.
Parameters | |
---|---|
genres |
String : An array of
TvContractCompat.Programs.Genres
that apply to the program which will be flattened to a String to store in a database. |
Returns | |
---|---|
T extends Builder |
This Builder object to allow for chaining of calls to builder methods. |
See also:
setChannelId
Program.Builder setChannelId (long channelId)
Sets the ID of the Channel
that contains this program.
Parameters | |
---|---|
channelId |
long : The value of {@link Programs#COLUMN_CHANNEL_ID for the program. |
Returns | |
---|---|
Program.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setContentRatings
T extends Builder setContentRatings (TvContentRating[] contentRatings)
Sets the content ratings for this program.
Parameters | |
---|---|
contentRatings |
TvContentRating : An array of TvContentRating that apply to
this program which will be flattened to a String to store in
a database. |
Returns | |
---|---|
T extends Builder |
This Builder object to allow for chaining of calls to builder methods. |
See also:
setDescription
T extends Builder setDescription (String description)
Sets a brief description of the program. For a series, this would be a brief description of the episode.
Parameters | |
---|---|
description |
String : The short description for the program. |
Returns | |
---|---|
T extends Builder |
This Builder object to allow for chaining of calls to builder methods. |
See also:
setEndTimeUtcMillis
Program.Builder setEndTimeUtcMillis (long endTimeUtcMillis)
Sets the time when this program is going to end in milliseconds since the epoch.
Parameters | |
---|---|
endTimeUtcMillis |
long : The value of COLUMN_END_TIME_UTC_MILLIS for the
program. |
Returns | |
---|---|
Program.Builder |
This Builder object to allow for chaining of calls to builder methods. |
setEpisodeNumber
T extends Builder setEpisodeNumber (int episodeNumber)
Sets the episode number in a season for this episode for a series.
Parameters | |
---|---|
episodeNumber |
int : The value of episode display number for the program. |
Returns | |
---|---|
T extends Builder |
This Builder object to allow for chaining of calls to builder methods. |
See also:
setEpisodeNumber
T extends Builder setEpisodeNumber (String episodeNumber, int numericalEpisodeNumber)
Sets the episode number in a season for this episode for a series.
Parameters | |
---|---|
episodeNumber |
String : The value of episode display number for the program. |
numericalEpisodeNumber |
int : An integer value for
COLUMN_EPISODE_NUMBER
which will be used for API Level 23 and below. |
Returns | |
---|---|
T extends Builder |
This Builder object to allow for chaining of calls to builder methods. |
setEpisodeTitle
T extends Builder setEpisodeTitle (String episodeTitle)
Sets the title of this particular episode for a series.
Parameters | |
---|---|
episodeTitle |
String : The episode title for the program. |
Returns | |
---|---|
T extends Builder |
This Builder object to allow for chaining of calls to builder methods. |
See also:
setId
T extends Builder setId (long programId)
Sets a unique id for this program.
Parameters | |
---|---|
programId |
long : The ID for the program. |
Returns | |
---|---|
T extends Builder |
This Builder object to allow for chaining of calls to builder methods. |
See also:
setInternalProviderData
T extends Builder setInternalProviderData (byte[] data)
Sets the internal provider data for the program as raw bytes.
Parameters | |
---|---|
data |
byte : The internal provider data for the program. |
Returns | |
---|---|
T extends Builder |
This Builder object to allow for chaining of calls to builder methods. |
See also:
setInternalProviderFlag1
T extends Builder setInternalProviderFlag1 (long flag)
Sets the internal provider flag1 for the program.