belongs to Maven artifact com.android.support:support-tv-provider:28.0.0-alpha1
TvContractCompat
public
final
class
TvContractCompat
extends Object
java.lang.Object | |
↳ | android.support.media.tv.TvContractCompat |
The contract between the TV provider and applications. Contains definitions for the supported URIs and columns.
Overview
TvContract defines a basic database of TV content metadata such as channel and program
information. The information is stored in TvContractCompat.Channels
and TvContractCompat.Programs
tables.
- A row in the
TvContractCompat.Channels
table represents information about a TV channel. The data format can vary greatly from standard to standard or according to service provider, thus the columns here are mostly comprised of basic entities that are usually seen to users regardless of standard such as channel number and name. - A row in the
TvContractCompat.Programs
table represents a set of data describing a TV program such as program title and start time.
Summary
Nested classes | |
---|---|
interface |
TvContractCompat.BaseTvColumns
Common base for the tables of TV channels/programs. |
class |
TvContractCompat.Channels
Column definitions for the TV channels table. |
class |
TvContractCompat.PreviewPrograms
Column definitions for the preview TV programs table. |
class |
TvContractCompat.Programs
Column definitions for the TV programs table. |
class |
TvContractCompat.RecordedPrograms
Column definitions for the recorded TV programs table. |
class |
TvContractCompat.WatchNextPrograms
Column definitions for the "watch next" TV programs table. |
Constants | |
---|---|
String |
ACTION_INITIALIZE_PROGRAMS
Broadcast Action: sent to the target TV input after it is first installed to notify the input to initialize its channels and programs to the system content provider. |
String |
ACTION_PREVIEW_PROGRAM_ADDED_TO_WATCH_NEXT
Broadcast Action: sent by the system to tell the target TV input that one of its existing preview programs is added to the watch next programs table by user. |
String |
ACTION_PREVIEW_PROGRAM_BROWSABLE_DISABLED
Broadcast Action: sent by the system to tell the target TV input that one of its preview program's browsable state is disabled, i.e., it will no longer be shown to users, which, for example, might be a result of users' interaction with UI. |
String |
ACTION_REQUEST_CHANNEL_BROWSABLE
Activity Action: sent by an application telling the system to make the given channel browsable with user interaction. |
String |
ACTION_WATCH_NEXT_PROGRAM_BROWSABLE_DISABLED
Broadcast Action: sent by the system to tell the target TV input that one of its "watch next" program's browsable state is disabled, i.e., it will no longer be shown to users, which, for example, might be a result of users' interaction with UI. |
String |
AUTHORITY
The authority for the TV provider. |
String |
EXTRA_CHANNEL_ID
The key for a bundle parameter containing a channel ID as a long integer |
String |
EXTRA_PREVIEW_PROGRAM_ID
The key for a bundle parameter containing a program ID as a long integer. |
String |
EXTRA_WATCH_NEXT_PROGRAM_ID
The key for a bundle parameter containing a watch next program ID as a long integer. |
Public methods | |
---|---|
static
Uri
|
buildChannelLogoUri(Uri channelUri)
Builds a URI that points to a channel logo. |
static
Uri
|
buildChannelLogoUri(long channelId)
Builds a URI that points to a channel logo. |
static
Uri
|
buildChannelUri(long channelId)
Builds a URI that points to a specific channel. |
static
Uri
|
buildChannelUriForPassthroughInput(String inputId)
Build a special channel URI intended to be used with pass-through inputs. |
static
Uri
|
buildChannelsUriForInput(String inputId)
Builds a URI that points to all channels from a given TV input. |
static
String
|
buildInputId(ComponentName name)
Builds an ID that uniquely identifies a TV input service. |
|