Builder

class Builder
kotlin.Any
   ↳ androidx.tvprovider.media.tv.Program.Builder

This Builder class simplifies the creation of a Program object.

Summary

Public constructors

Creates a new Builder object.

<init>(other: Program!)

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

Public methods
open Program.Builder!
setId(programId: Long)

Sets a unique id for this program.

open Program.Builder!
setEpisodeNumber(episodeNumber: Int)

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

open Program.Builder!
setEpisodeNumber(episodeNumber: String!, numericalEpisodeNumber: Int)

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

open Program.Builder!
setEndTimeUtcMillis(endTimeUtcMillis: Long)

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

open Program.Builder!
setAudioLanguages(audioLanguages: Array<String!>!)

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

open Program.Builder!
setSeasonNumber(seasonNumber: Int)

Sets the season number for this episode for a series.

open Program.Builder!
setSeasonNumber(seasonNumber: String!, numericalSeasonNumber: Int)

Sets the season number for this episode for a series.

open Program.Builder!

Sets the video width of the program.

open Program.Builder!

Sets the internal provider flag4 for the program.

open Program.Builder!
setReviewRatingStyle(reviewRatingStyle: Int)

Sets the review rating score style used for #setReviewRating.

open Program.Builder!
setChannelId(channelId: Long)

Sets the ID of the Channel that contains this program.

open Program.Builder!

Sets the internal provider flag2 for the program.

open Program.Builder!

Sets whether this program cannot be recorded.

open Program!

open Program.Builder!

Sets the video height of the program.

open Program.Builder!
setPackageName(packageName: String!)

Sets the package name for this program.

open Program.Builder!
setTitle(title: String!)

Sets the title of this program.

open Program.Builder!

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

open Program.Builder!
setSeasonTitle(seasonTitle: String!)

Sets a custom name for the season, if applicable.

open Program.Builder!
setSearchable(searchable: Boolean)

Sets whether this channel can be searched for in other applications.

open Program.Builder!
setThumbnailUri(thumbnailUri: Uri!)

Sets a small thumbnail of the program.

open Program.Builder!
setStartTimeUtcMillis(startTimeUtcMillis: Long)

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

open Program.Builder!

Sets the broadcast-specified genres of the program.

open Program.Builder!

Sets the internal provider flag3 for the program.

open Program.Builder!
setPosterArtUri(posterArtUri: Uri!)

Sets the large poster art of the program.

open Program.Builder!

Sets the internal provider flag1 for the program.

open Program.Builder!
setLongDescription(longDescription: String!)

Sets a longer description of a program if one exists.

open Program.Builder!
setDescription(description: String!)

Sets a brief description of the program.

open Program.Builder!

Sets the genres of the program.

open Program.Builder!
setEpisodeTitle(episodeTitle: String!)

Sets the title of this particular episode for a series.

open Program.Builder!
setReviewRating(reviewRating: String!)

Sets the review rating score for this program.

open Program.Builder!

Sets the content ratings for this program.

Public constructors

<init>

Builder()

Creates a new Builder object.

<init>

Builder(other: Program!)

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

Parameters
other Program!: The Program you're copying from.

Public methods

setId

open fun setId(programId: Long): Program.Builder!

Sets a unique id for this program.

Parameters
programId Long: The ID for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setEpisodeNumber

open fun setEpisodeNumber(episodeNumber: Int): Program.Builder!

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.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setEpisodeNumber

open fun setEpisodeNumber(episodeNumber: String!, numericalEpisodeNumber: Int): Program.Builder!

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 String!: An integer value for androidx.tvprovider.media.tv.TvContractCompat.Programs#COLUMN_EPISODE_NUMBER which will be used for API Level 23 and below.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setEndTimeUtcMillis

open fun setEndTimeUtcMillis(endTimeUtcMillis: Long): Program.Builder!

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

Parameters
endTimeUtcMillis Long: The value of Programs#COLUMN_END_TIME_UTC_MILLIS for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setAudioLanguages

open fun setAudioLanguages(audioLanguages: Array<String!>!): Program.Builder!

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

Parameters
audioLanguages Array<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.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setSeasonNumber

open fun setSeasonNumber(seasonNumber: Int): Program.Builder!

Sets the season number for this episode for a series.

Parameters
seasonNumber Int: The season display number for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setSeasonNumber

open fun setSeasonNumber(seasonNumber: String!, numericalSeasonNumber: Int): Program.Builder!

Sets the season number for this episode for a series.

Parameters
seasonNumber String!: The season display number for the program.
numericalSeasonNumber String!: An integer value for androidx.tvprovider.media.tv.TvContractCompat.Programs#COLUMN_SEASON_NUMBER which will be used for API Level 23 and below.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setVideoWidth

open fun setVideoWidth(width: Int): Program.Builder!

Sets the video width of the program.

Parameters
width Int: The video width for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setInternalProviderFlag4

open fun setInternalProviderFlag4(flag: Long): Program.Builder!

Sets the internal provider flag4 for the program.

Parameters
flag Long: The forth internal provider flag for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setReviewRatingStyle

open fun setReviewRatingStyle(reviewRatingStyle: Int): Program.Builder!

Sets the review rating score style used for #setReviewRating.

Parameters
reviewRatingStyle Int: The reviewing rating style for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setChannelId

open fun setChannelId(channelId: Long): Program.Builder!

Sets the ID of the Channel that contains this program.

Parameters
channelId Long: The value of for the program.

setInternalProviderFlag2

open fun setInternalProviderFlag2(flag: Long): Program.Builder!

Sets the internal provider flag2 for the program.

Parameters
flag Long: The second internal provider flag for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setRecordingProhibited

open fun setRecordingProhibited(prohibited: Boolean): Program.Builder!

Sets whether this program cannot be recorded.

Parameters
prohibited Boolean: The value of Programs#COLUMN_RECORDING_PROHIBITED for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

build

open fun build(): Program!
Return
Program!: A new Program with values supplied by the Builder.

setVideoHeight

open fun setVideoHeight(height: Int): Program.Builder!

Sets the video height of the program.

Parameters
height Int: The video height for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setPackageName

open fun setPackageName(packageName: String!): Program.Builder!

Sets the package name for this program.

Parameters
packageName String!: The package name for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setTitle

open fun setTitle(title: String!): Program.Builder!

Sets the title of this program. For a series, this is the series title.

Parameters
title String!: The title for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setInternalProviderData

open fun setInternalProviderData(data: ByteArray!): Program.Builder!

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

Parameters
data ByteArray!: The internal provider data for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setSeasonTitle

open fun setSeasonTitle(seasonTitle: String!): Program.Builder!

Sets a custom name for the season, if applicable.

Parameters
seasonTitle String!: The season title for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setSearchable

open fun setSearchable(searchable: Boolean): Program.Builder!

Sets whether this channel can be searched for in other applications.

Parameters
searchable Boolean: Whether the program is searchable or not.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setThumbnailUri

open fun setThumbnailUri(thumbnailUri: Uri!): Program.Builder!

Sets a small thumbnail of the program.

Parameters
thumbnailUri Uri!: The thumbnail URI for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setStartTimeUtcMillis

open fun setStartTimeUtcMillis(startTimeUtcMillis: Long): Program.Builder!

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

Parameters
startTimeUtcMillis Long: The value of Programs#COLUMN_START_TIME_UTC_MILLIS for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setBroadcastGenres

open fun setBroadcastGenres(genres: Array<String!>!): Program.Builder!

Sets the broadcast-specified genres of the program.

Parameters
genres Array<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.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setInternalProviderFlag3

open fun setInternalProviderFlag3(flag: Long): Program.Builder!

Sets the internal provider flag3 for the program.

Parameters
flag Long: The third internal provider flag for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setPosterArtUri

open fun setPosterArtUri(posterArtUri: Uri!): Program.Builder!

Sets the large poster art of the program.

Parameters
posterArtUri Uri!: The poster art URI for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setInternalProviderFlag1

open fun setInternalProviderFlag1(flag: Long): Program.Builder!

Sets the internal provider flag1 for the program.

Parameters
flag Long: The first internal provider flag for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setLongDescription

open fun setLongDescription(longDescription: String!): Program.Builder!

Sets a longer description of a program if one exists.

Parameters
longDescription String!: The long description for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setDescription

open fun setDescription(description: String!): Program.Builder!

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.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setCanonicalGenres

open fun setCanonicalGenres(genres: Array<String!>!): Program.Builder!

Sets the genres of the program.

Parameters
genres Array<String!>!: An array of androidx.tvprovider.media.tv.TvContractCompat.Programs.Genres that apply to the program which will be flattened to a String to store in a database.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setEpisodeTitle

open fun setEpisodeTitle(episodeTitle: String!): Program.Builder!

Sets the title of this particular episode for a series.

Parameters
episodeTitle String!: The episode title for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setReviewRating

open fun setReviewRating(reviewRating: String!): Program.Builder!

Sets the review rating score for this program.

The format of the value is dependent on the review rating style. If the style is based on "stars", the value should be a real number between 0.0 and 5.0. (e.g. "4.5") If the style is based on "thumbs up/down", the value should be two integers, one for thumbs-up count and the other for thumbs-down count, with a comma between them. (e.g. "200,40") If the style is base on "percentage", the value should be a real number between 0 and 100. (e.g. "99.9")

Parameters
reviewRating String!: The value of the review rating for the program.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.

setContentRatings

open fun setContentRatings(contentRatings: Array<TvContentRating!>!): Program.Builder!

Sets the content ratings for this program.

Parameters
contentRatings Array<TvContentRating!>!: An array of android.media.tv.TvContentRating that apply to this program which will be flattened to a String to store in a database.
Return
Program.Builder!: This Builder object to allow for chaining of calls to builder methods.