TvRecordingInfo
class TvRecordingInfo : Parcelable
kotlin.Any | |
↳ | android.media.tv.TvRecordingInfo |
This class is used to describe the meta information for a TV recording. It can be retrieved by the android.media.tv.interactive.TvInteractiveAppService
by using getTvRecordingInfo or getTvRecordingInfoList. It can then be updated to the TV app using setTvRecordingInfo.
Summary
Constants | |
---|---|
static Int | |
static Int | |
static Int | |
static Int | |
static Int | |
static Int | |
static Int | |
static Int | |
static Int | |
static Int |
Inherited constants | |
---|---|
Public constructors | |
---|---|
TvRecordingInfo(recordingId: String, startPadding: Long, endPadding: Long, repeatDays: Int, name: String, description: String, scheduledStartTime: Long, scheduledDuration: Long, channelUri: Uri, programUri: Uri?, contentRatings: MutableList<TvContentRating!>, recordingUri: Uri?, recordingStartTime: Long, recordingDuration: Long) |
Public methods | |
---|---|
Int | |
Uri |
Returns the uri of the broadcast channel where the recording will take place. |
MutableList<TvContentRating!> |
Returns a list of content ratings for the program(s) in this recording. |
String |
Returns the description of the scheduled recording. |
Long |
Returns the ending padding duration of this recording in milliseconds since the epoch. |
String |
getName() Returns the name of the scheduled recording. |
Uri? |
Returns the uri of the scheduled program or series. |
Long |
The real duration of the recording, including any padding, in milliseconds since the epoch. |
String |
Returns the ID of this recording. |
Long |
The real start time of the recording, including any padding, in milliseconds since the epoch. |
Uri? |
The uri of the recording in local storage. |
Int |
Returns the days of the week for which this recording should be repeated for. |
Long |
Returns the scheduled duration of the recording in milliseconds since the epoch. |
Long |
Returns the scheduled start time of the recording in milliseconds since the epoch. |
Long |
Returns the start padding duration of this recording in milliseconds since the epoch. |
Unit |
setDescription(description: String) Sets the description of the scheduled recording. |
Unit |
Sets the name of the scheduled recording. |
Unit |
writeToParcel(dest: Parcel, flags: Int) Used to package this object into a |
Properties | |
---|---|
static Parcelable.Creator<TvRecordingInfo!> |
Constants
Public constructors
TvRecordingInfo
TvRecordingInfo(
recordingId: String,
startPadding: Long,
endPadding: Long,
repeatDays: Int,
name: String,
description: String,
scheduledStartTime: Long,
scheduledDuration: Long,
channelUri: Uri,
programUri: Uri?,
contentRatings: MutableList<TvContentRating!>,
recordingUri: Uri?,
recordingStartTime: Long,
recordingDuration: Long)
Parameters | |
---|---|
recordingId |
String: This value cannot be null . |
name |
String: This value cannot be null . |
description |
String: This value cannot be null . |
channelUri |
Uri: This value cannot be null . |
programUri |
Uri?: This value may be null . |
contentRatings |
MutableList<TvContentRating!>: This value cannot be null . |
recordingUri |
Uri?: This value may be null . |
Public methods
describeContents
fun describeContents(): Int
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
getChannelUri
fun getChannelUri(): Uri
Returns the uri of the broadcast channel where the recording will take place.
Return | |
---|---|
Uri |
This value cannot be null . |
getContentRatings
fun getContentRatings(): MutableList<TvContentRating!>
Returns a list of content ratings for the program(s) in this recording.
Returns an empty list if no content rating information is available.
Return | |
---|---|
MutableList<TvContentRating!> |
This value cannot be null . |
getDescription
fun getDescription(): String
Returns the description of the scheduled recording.
This is set with TvRecordingInfo#setDescription(String)
and sent to tv app with android.media.tv.interactive.TvInteractiveAppService.Session#setTvRecordingInfo(String, TvRecordingInfo)
Return | |
---|---|
String |
This value cannot be null . |
getEndPaddingMillis
fun getEndPaddingMillis(): Long
Returns the ending padding duration of this recording in milliseconds since the epoch.
A positive value should cause the recording to end later than the specified time. This should cause the actual duration of the recording to increase. A negative value should cause the recording to end earlier than the specified time. This should cause the actual duration of the recording to decrease.
getName
fun getName(): String
Returns the name of the scheduled recording.
This is set with TvRecordingInfo#setName(String)
and sent to tv app with android.media.tv.interactive.TvInteractiveAppService.Session#setTvRecordingInfo(String, TvRecordingInfo)
Return | |
---|---|
String |
This value cannot be null . |
getProgramUri
fun getProgramUri(): Uri?
Returns the uri of the scheduled program or series.
For recordings scheduled using scheduleRecording, this value may be null. A non-null programUri implies the started recording should be of that specific program, whereas a null programUri does not impose such a requirement and the recording can span across multiple TV programs.
getRecordingDurationMillis
fun getRecordingDurationMillis(): Long
The real duration of the recording, including any padding, in milliseconds since the epoch.
This may not be the same as the value of getScheduledDurationMillis()
due to a recording starting late, or due to start/end padding.
Returns -1 for recordings that have not yet started.
Return | |
---|---|
Long |
Value is -1 or greater |
getRecordingId
fun getRecordingId(): String
Returns the ID of this recording. This ID is created and maintained by the TV app.
Return | |
---|---|
String |
This value cannot be null . |
getRecordingStartTimeMillis
fun getRecordingStartTimeMillis(): Long
The real start time of the recording, including any padding, in milliseconds since the epoch.
This may not be the same as the value of getScheduledStartTimeMillis()
due to a recording starting late, or due to start/end padding.
Returns -1 for recordings that have not yet started.
Return | |
---|---|
Long |
Value is -1 or greater |
getRecordingUri
fun getRecordingUri(): Uri?
The uri of the recording in local storage.
Could be null in the event that the recording has not been completed.
getRepeatDays
fun getRepeatDays(): Int
Returns the days of the week for which this recording should be repeated for.
This information is represented in the form of a bitfield, with each bit representing the day which the recording should be repeated.
The bitfield corresponds to each day of the week with the following format:
SUNDAY
- 0x01 (00000001)MONDAY
- 0x02 (00000010)TUESDAY
- 0x04 (00000100)WEDNESDAY
- 0x08 (00001000)THURSDAY
- 0x10 (00010000)FRIDAY
- 0x20 (00100000)SATURDAY
- 0x40 (01000000)
You can specify multiple days to repeat the recording by performing a bitwise 'OR' on the bitfield. For example, for a recording to repeat on Sunday and Mondays, this function should return 0x03 (00000011).
A value of 0x00 indicates that the recording will not be repeated.
This format comes from the Open IPTV Forum Release 2 Specification. It is described in Volume 5, section 7.10.1.1.
getScheduledDurationMillis
fun getScheduledDurationMillis(): Long
Returns the scheduled duration of the recording in milliseconds since the epoch.
Return | |
---|---|
Long |
Value is 0 or greater |
getScheduledStartTimeMillis
fun getScheduledStartTimeMillis(): Long
Returns the scheduled start time of the recording in milliseconds since the epoch.
Return | |
---|---|
Long |
Value is 0 or greater |
getStartPaddingMillis
fun getStartPaddingMillis(): Long
Returns the start padding duration of this recording in milliseconds since the epoch.
A positive value should cause the recording to start earlier than the specified time. This should cause the actual duration of the recording to increase. A negative value should cause the recording to start later than the specified time. This should cause the actual duration of the recording to decrease.
setDescription
fun setDescription(description: String): Unit
Sets the description of the scheduled recording.
Updates to the TvRecordingInfo
can be sent to the TV app with android.media.tv.interactive.TvInteractiveAppService.Session#setTvRecordingInfo(String, TvRecordingInfo)
Parameters | |
---|---|
description |
String: This value cannot be null . |
setName
fun setName(name: String): Unit
Sets the name of the scheduled recording.
Updates to the TvRecordingInfo
can be sent to the TV app with android.media.tv.interactive.TvInteractiveAppService.Session#setTvRecordingInfo(String, TvRecordingInfo)
Parameters | |
---|---|
name |
String: This value cannot be null . |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Used to package this object into a Parcel
.
Parameters | |
---|---|
dest |
Parcel: The Parcel to be written. This value cannot be null . |
flags |
Int: The flags used for parceling. |