public
final
class
TvContract
extends Object
java.lang.Object | |
↳ | android.media.tv.TvContract |
The contract between the TV provider and applications. Contains definitions for the supported URIs and columns.
TvContract defines a basic database of TV content metadata such as channel and program
information. The information is stored in TvContract.Channels
and TvContract.Programs
tables.
TvContract.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.TvContract.Programs
table represents a set of data describing a TV program such
as program title and start time.Nested classes | |
---|---|
interface |
TvContract.BaseTvColumns
Common base for the tables of TV channels/programs. |
class |
TvContract.Channels
Column definitions for the TV channels table. |
class |
TvContract.Programs
Column definitions for the TV programs table. |
class |
TvContract.RecordedPrograms
Column definitions for the recorded TV programs table. |
Constants | |
---|---|
String |
AUTHORITY
The authority for the TV provider. |
Public methods | |
---|---|
static
final
Uri
|
buildChannelLogoUri(Uri channelUri)
Builds a URI that points to a channel logo. |
static
final
Uri
|
buildChannelLogoUri(long channelId)
Builds a URI that points to a channel logo. |
static
final
Uri
|
buildChannelUri(long channelId)
Builds a URI that points to a specific channel. |
static
final
Uri
|
buildChannelUriForPassthroughInput(String inputId)
Build a special channel URI intended to be used with pass-through inputs. |
static
final
Uri
|
buildChannelsUriForInput(String inputId)
Builds a URI that points to all channels from a given TV input. |
static
final
String
|
buildInputId(ComponentName name)
Builds an ID that uniquely identifies a TV input service. |
static
final
Uri
|
buildProgramUri(long programId)
Builds a URI that points to a specific program. |
static
final
Uri
|
buildProgramsUriForChannel(long channelId, long startTime, long endTime)
Builds a URI that points to programs on a specific channel whose schedules overlap with the given time frame. |
static
final
Uri
|
buildProgramsUriForChannel(long channelId)
Builds a URI that points to all programs on a given channel. |
static
final
Uri
|
buildProgramsUriForChannel(Uri channelUri)
Builds a URI that points to all programs on a given channel. |
static
final
Uri
|
buildProgramsUriForChannel(Uri channelUri, long startTime, long endTime)
Builds a URI that points to programs on a specific channel whose schedules overlap with the given time frame. |
static
final
Uri
|
buildRecordedProgramUri(long recordedProgramId)
Builds a URI that points to a specific recorded program. |
static
final
boolean
|
isChannelUri(Uri uri)
Returns |
static
final
boolean
|
isChannelUriForPassthroughInput(Uri uri)
Returns |
static
final
boolean
|
isChannelUriForTunerInput(Uri uri)
Returns |
static
final
boolean
|
isProgramUri(Uri uri)
Returns |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
String AUTHORITY
The authority for the TV provider.
Constant Value: "android.media.tv"
Uri buildChannelLogoUri (Uri channelUri)
Builds a URI that points to a channel logo. See TvContract.Channels.Logo
.
Parameters | |
---|---|
channelUri |
Uri :
The URI of the channel whose logo is pointed to.
|
Returns | |
---|---|
Uri |
Uri buildChannelLogoUri (long channelId)
Builds a URI that points to a channel logo. See TvContract.Channels.Logo
.
Parameters | |
---|---|
channelId |
long :
The ID of the channel whose logo is pointed to.
|
Returns | |
---|---|
Uri |
Uri buildChannelUri (long channelId)
Builds a URI that points to a specific channel.
Parameters | |
---|---|
channelId |
long :
The ID of the channel to point to.
|
Returns | |
---|---|
Uri |
Uri buildChannelUriForPassthroughInput (String inputId)
Build a special channel URI intended to be used with pass-through inputs. (e.g. HDMI)
Parameters | |
---|---|
inputId |
String :
The ID of the pass-through input to build a channels URI for. |
Returns | |
---|---|
Uri |
See also:
Uri buildChannelsUriForInput (String inputId)
Builds a URI that points to all channels from a given TV input.
Parameters | |
---|---|
inputId |
String :
The ID of the TV input to build a channels URI for. If null , builds a
URI for all the TV inputs.
|
Returns | |
---|---|
Uri |
String buildInputId (ComponentName name)
Builds an ID that uniquely identifies a TV input service.
Parameters | |
---|---|
name |
ComponentName :
The ComponentName of the TV input service to build ID for. |
Returns | |
---|---|
String |
the ID for the given TV input service. |
Uri buildProgramUri (long programId)
Builds a URI that points to a specific program.
Parameters | |
---|---|
programId |
long :
The ID of the program to point to.
|
Returns | |
---|---|
Uri |
Uri buildProgramsUriForChannel (long channelId, long startTime, long endTime)
Builds a URI that points to programs on a specific channel whose schedules overlap with the given time frame.
Parameters | |
---|---|
channelId |
long :
The ID of the channel to return programs for. |
startTime |
long :
The start time used to filter programs. The returned programs should have
COLUMN_END_TIME_UTC_MILLIS that is greater than this time. |
endTime |
long :
The end time used to filter programs. The returned programs should have
COLUMN_START_TIME_UTC_MILLIS that is less than this time.
|
Returns | |
---|---|
Uri |
Uri buildProgramsUriForChannel (long channelId)
Builds a URI that points to all programs on a given channel.
Parameters | |
---|---|
channelId |
long :
The ID of the channel to return programs for.
|
Returns | |
---|---|
Uri |
Uri buildProgramsUriForChannel (Uri channelUri)
Builds a URI that points to all programs on a given channel.
Parameters | |
---|---|
channelUri |
Uri :
The URI of the channel to return programs for.
|
Returns | |
---|---|
Uri |
Uri buildProgramsUriForChannel (Uri channelUri, long startTime, long endTime)
Builds a URI that points to programs on a specific channel whose schedules overlap with the given time frame.
Parameters | |
---|---|
channelUri |
Uri :
The URI of the channel to return programs for. |
startTime |
long :
The start time used to filter programs. The returned programs should have
COLUMN_END_TIME_UTC_MILLIS that is greater than this time. |
endTime |
long :
The end time used to filter programs. The returned programs should have
COLUMN_START_TIME_UTC_MILLIS that is less than this time.
|
Returns | |
---|---|
Uri |
Uri buildRecordedProgramUri (long recordedProgramId)
Builds a URI that points to a specific recorded program.
Parameters | |
---|---|
recordedProgramId |
long :
The ID of the recorded program to point to.
|
Returns | |
---|---|
Uri |
boolean isChannelUri (Uri uri)
Returns true
, if uri
is a channel URI.
Parameters | |
---|---|
uri |
Uri
|
Returns | |
---|---|
boolean |
boolean isChannelUriForPassthroughInput (Uri uri)
Returns true
, if uri
is a channel URI for a pass-through input.
Parameters | |
---|---|
uri |
Uri
|
Returns | |
---|---|
boolean |
boolean isChannelUriForTunerInput (Uri uri)
Returns true
, if uri
is a channel URI for a tuner input.
Parameters | |
---|---|
uri |
Uri
|
Returns | |
---|---|
boolean |
boolean isProgramUri (Uri uri)
Returns true
, if uri
is a program URI.
Parameters | |
---|---|
uri |
Uri
|
Returns | |
---|---|
boolean |