Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

Builder

class Builder : Builder<Program.Builder!>
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!
setEndTimeUtcMillis(endTimeUtcMillis: Long)

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

open Program.Builder!
setChannelId(channelId: Long)

Sets the ID of the Channel that contains this program.

open Program.Builder!

Sets whether this program cannot be recorded.

open 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.

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

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.

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.

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.

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.