Android APIs
public static final class

TvContract.Channels

extends Object
implements TvContract.BaseTvColumns
java.lang.Object
   ↳ android.media.tv.TvContract.Channels

Class Overview

Column definitions for the TV channels table.

Summary

Nested Classes
class TvContract.Channels.Logo A sub-directory of a single TV channel that represents its primary logo. 
Constants
String COLUMN_DESCRIPTION The description of this TV channel.
String COLUMN_DISPLAY_NAME The channel name that is displayed to the user.
String COLUMN_DISPLAY_NUMBER The channel number that is displayed to the user.
String COLUMN_INPUT_ID The ID of the TV input service that provides this TV channel.
String COLUMN_INTERNAL_PROVIDER_DATA Internal data used by individual TV input services.
String COLUMN_NETWORK_AFFILIATION The network affiliation for this TV channel.
String COLUMN_ORIGINAL_NETWORK_ID The original network ID of this TV channel.
String COLUMN_SEARCHABLE The flag indicating whether this TV channel is searchable or not.
String COLUMN_SERVICE_ID The service ID of this channel.
String COLUMN_SERVICE_TYPE The predefined service type of this TV channel.
String COLUMN_TRANSPORT_STREAM_ID The transport stream ID of this channel.
String COLUMN_TYPE The predefined type of this TV channel.
String COLUMN_VERSION_NUMBER The version number of this row entry used by TV input services.
String COLUMN_VIDEO_FORMAT The typical video format for programs from this TV channel.
String CONTENT_ITEM_TYPE The MIME type of a single TV channel.
String CONTENT_TYPE The MIME type of a directory of TV channels.
String SERVICE_TYPE_AUDIO The service type for radio channels that have audio only.
String SERVICE_TYPE_AUDIO_VIDEO The service type for regular TV channels that have both audio and video.
String SERVICE_TYPE_OTHER A generic service type.
String TYPE_1SEG The channel type for 1seg (handheld).
String TYPE_ATSC_C The channel type for ATSC (cable).
String TYPE_ATSC_M_H The channel type for ATSC-M/H (mobile/handheld).
String TYPE_ATSC_T The channel type for ATSC (terrestrial).
String TYPE_CMMB The channel type for CMMB (handheld).
String TYPE_DTMB The channel type for DTMB (terrestrial).
String TYPE_DVB_C The channel type for DVB-C (cable).
String TYPE_DVB_C2 The channel type for DVB-C2 (cable).
String TYPE_DVB_H The channel type for DVB-H (handheld).
String TYPE_DVB_S The channel type for DVB-S (satellite).
String TYPE_DVB_S2 The channel type for DVB-S2 (satellite).
String TYPE_DVB_SH The channel type for DVB-SH (satellite).
String TYPE_DVB_T The channel type for DVB-T (terrestrial).
String TYPE_DVB_T2 The channel type for DVB-T2 (terrestrial).
String TYPE_ISDB_C The channel type for ISDB-C (cable).
String TYPE_ISDB_S The channel type for ISDB-S (satellite).
String TYPE_ISDB_T The channel type for ISDB-T (terrestrial).
String TYPE_ISDB_TB The channel type for ISDB-Tb (Brazil).
String TYPE_NTSC The channel type for NTSC.
String TYPE_OTHER A generic channel type.
String TYPE_PAL The channel type for PAL.
String TYPE_SECAM The channel type for SECAM.
String TYPE_S_DMB The channel type for S-DMB (satellite).
String TYPE_T_DMB The channel type for T-DMB (terrestrial).
String VIDEO_FORMAT_1080I The video format for 1080i.
String VIDEO_FORMAT_1080P The video format for 1080p.
String VIDEO_FORMAT_2160P The video format for 2160p.
String VIDEO_FORMAT_240P The video format for 240p.
String VIDEO_FORMAT_360P The video format for 360p.
String VIDEO_FORMAT_4320P The video format for 4320p.
String VIDEO_FORMAT_480I The video format for 480i.
String VIDEO_FORMAT_480P The video format for 480p.
String VIDEO_FORMAT_576I The video format for 576i.
String VIDEO_FORMAT_576P The video format for 576p.
String VIDEO_FORMAT_720P The video format for 720p.
String VIDEO_RESOLUTION_ED The video resolution for enhanced-definition.
String VIDEO_RESOLUTION_FHD The video resolution for full high-definition.
String VIDEO_RESOLUTION_HD The video resolution for high-definition.
String VIDEO_RESOLUTION_SD The video resolution for standard-definition.
String VIDEO_RESOLUTION_UHD The video resolution for ultra high-definition.
[Expand]
Inherited Constants
From interface android.media.tv.TvContract.BaseTvColumns
From interface android.provider.BaseColumns
Fields
public static final Uri CONTENT_URI The content:// style URI for this table.
Public Methods
final static String getVideoResolution(String videoFormat)
Returns the video resolution (definition) for a given video format.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String COLUMN_DESCRIPTION

Added in API level 21

The description of this TV channel.

Can be empty initially.

Type: TEXT

Constant Value: "description"

public static final String COLUMN_DISPLAY_NAME

Added in API level 21

The channel name that is displayed to the user.

A call sign is a good candidate to use for this purpose but any name that helps the user recognize the current channel will be enough. Can also be empty depending on broadcast standard.

Type: TEXT

Constant Value: "display_name"

public static final String COLUMN_DISPLAY_NUMBER

Added in API level 21

The channel number that is displayed to the user.

The format can vary depending on broadcast standard and product specification.

Type: TEXT

Constant Value: "display_number"

public static final String COLUMN_INPUT_ID

Added in API level 21

The ID of the TV input service that provides this TV channel.

Use buildInputId(ComponentName) to build the ID.

This is a required field.

Type: TEXT

Constant Value: "input_id"

public static final String COLUMN_INTERNAL_PROVIDER_DATA

Added in API level 21

Internal data used by individual TV input services.

This is internal to the provider that inserted it, and should not be decoded by other apps.

Type: BLOB

Constant Value: "internal_provider_data"

public static final String COLUMN_NETWORK_AFFILIATION

Added in API level 21

The network affiliation for this TV channel.

This is used to identify a channel that is commonly called by its network affiliation instead of the display name. Examples include ABC for the channel KGO-HD, FOX for the channel KTVU-HD and NBC for the channel KNTV-HD. Can be empty if not applicable.

Type: TEXT

Constant Value: "network_affiliation"

public static final String COLUMN_ORIGINAL_NETWORK_ID

Added in API level 21

The original network ID of this TV channel.

This is used to identify the originating delivery system, if applicable. Use the same coding for original_network_id in the underlying broadcast standard if it is defined there (e.g. ETSI EN 300 468/TR 101 211 and ARIB STD-B10). If channels cannot be globally identified by 2-tuple {COLUMN_TRANSPORT_STREAM_ID, COLUMN_SERVICE_ID}, one must carefully assign a value to this field to form a unique 3-tuple identification {COLUMN_ORIGINAL_NETWORK_ID, COLUMN_TRANSPORT_STREAM_ID, COLUMN_SERVICE_ID} for its channels.

This is a required field if the channel cannot be uniquely identified by a 2-tuple {COLUMN_TRANSPORT_STREAM_ID, COLUMN_SERVICE_ID}.

Type: INTEGER

Constant Value: "original_network_id"

public static final String COLUMN_SEARCHABLE

Added in API level 21

The flag indicating whether this TV channel is searchable or not.

In some regions, it is not allowed to surface search results for a given channel without broadcaster's consent. This is used to impose such restriction. Channels marked with "not searchable" cannot be used by other services except for the system service that shows the TV content. A value of 1 indicates the channel is searchable and can be included in search results, a value of 0 indicates the channel and its TV programs are hidden from search. If not specified, this value is set to 1 (searchable) by default.

Type: INTEGER (boolean)

Constant Value: "searchable"

public static final String COLUMN_SERVICE_ID

Added in API level 21

The service ID of this channel.

This is used to identify the current service (roughly equivalent to channel) from any other service within the Transport Stream, if applicable. Use the same coding for service_id in the underlying broadcast standard if it is defined there (e.g. ETSI EN 300 468 and ARIB STD-B10) or program_number (which usually has the same value as service_id) in ISO/IEC 13818-1 if the channel is transmitted via the MPEG Transport Stream.

This is a required field if the current channel is transmitted via the MPEG Transport Stream.

Type: INTEGER

Constant Value: "service_id"

public static final String COLUMN_SERVICE_TYPE

Added in API level 21

The predefined service type of this TV channel.

This is primarily used to indicate whether the current channel is a regular TV channel or a radio-like channel. Use the same coding for service_type in the underlying broadcast standard if it is defined there (e.g. ATSC A/53, ETSI EN 300 468 and ARIB STD-B10). Otherwise use one of the followings: SERVICE_TYPE_OTHER, SERVICE_TYPE_AUDIO_VIDEO, SERVICE_TYPE_AUDIO

This is a required field.

Type: TEXT

Constant Value: "service_type"

public static final String COLUMN_TRANSPORT_STREAM_ID

Added in API level 21

The transport stream ID of this channel.

This is used to identify the Transport Stream that contains the current channel from any other multiplex within a network, if applicable. Use the same coding for transport_stream_id defined in ISO/IEC 13818-1 if the channel is transmitted via the MPEG Transport Stream as is the case for many digital broadcast standards.

This is a required field if the current channel is transmitted via the MPEG Transport Stream.

Type: INTEGER

Constant Value: "transport_stream_id"

public static final String COLUMN_TYPE

Added in API level 21

The predefined type of this TV channel.

This is primarily used to indicate which broadcast standard (e.g. ATSC, DVB or ISDB) the current channel conforms to. The value should match to one of the followings: TYPE_OTHER, TYPE_DVB_T, TYPE_DVB_T2, TYPE_DVB_S, TYPE_DVB_S2, TYPE_DVB_C, TYPE_DVB_C2, TYPE_DVB_H, TYPE_DVB_SH, TYPE_ATSC_T, TYPE_ATSC_C, TYPE_ATSC_M_H, TYPE_ISDB_T, TYPE_ISDB_TB, TYPE_ISDB_S, TYPE_ISDB_C, TYPE_1SEG, TYPE_DTMB, TYPE_CMMB, TYPE_T_DMB, TYPE_S_DMB

This is a required field.

Type: TEXT

Constant Value: "type"

public static final String COLUMN_VERSION_NUMBER

Added in API level 21

The version number of this row entry used by TV input services.

This is best used by sync adapters to identify the rows to update. The number can be defined by individual TV input services. One may assign the same value as version_number that appears in ETSI EN 300 468 or ATSC A/65, if the data are coming from a TV broadcast.

Type: INTEGER

Constant Value: "version_number"

public static final String COLUMN_VIDEO_FORMAT

Added in API level 21

The typical video format for programs from this TV channel.

This is primarily used to filter out channels based on video format by applications. The value should match one of the followings: VIDEO_FORMAT_240P, VIDEO_FORMAT_360P, VIDEO_FORMAT_480I, VIDEO_FORMAT_480P, VIDEO_FORMAT_576I, VIDEO_FORMAT_576P, VIDEO_FORMAT_720P, VIDEO_FORMAT_1080I, VIDEO_FORMAT_1080P, VIDEO_FORMAT_2160P, VIDEO_FORMAT_4320P. Note that the actual video resolution of each program from a given channel can vary thus one should use COLUMN_VIDEO_WIDTH and COLUMN_VIDEO_HEIGHT to get more accurate video resolution.

Type: TEXT

Constant Value: "video_format"

public static final String CONTENT_ITEM_TYPE

Added in API level 21

The MIME type of a single TV channel.

Constant Value: "vnd.android.cursor.item/channel"

public static final String CONTENT_TYPE

Added in API level 21

The MIME type of a directory of TV channels.

Constant Value: "vnd.android.cursor.dir/channel"

public static final String SERVICE_TYPE_AUDIO

Added in API level 21

The service type for radio channels that have audio only.

Constant Value: "SERVICE_TYPE_AUDIO"

public static final String SERVICE_TYPE_AUDIO_VIDEO

Added in API level 21

The service type for regular TV channels that have both audio and video.

Constant Value: "SERVICE_TYPE_AUDIO_VIDEO"

public static final String SERVICE_TYPE_OTHER

Added in API level 21

A generic service type.

Constant Value: "SERVICE_TYPE_OTHER"

public static final String TYPE_1SEG

Added in API level 21

The channel type for 1seg (handheld).

Constant Value: "TYPE_1SEG"

public static final String TYPE_ATSC_C

Added in API level 21

The channel type for ATSC (cable).

Constant Value: "TYPE_ATSC_C"

public static final String TYPE_ATSC_M_H

Added in API level 21

The channel type for ATSC-M/H (mobile/handheld).

Constant Value: "TYPE_ATSC_M_H"

public static final String TYPE_ATSC_T

Added in API level 21

The channel type for ATSC (terrestrial).

Constant Value: "TYPE_ATSC_T"

public static final String TYPE_CMMB

Added in API level 21

The channel type for CMMB (handheld).

Constant Value: "TYPE_CMMB"

public static final String TYPE_DTMB

Added in API level 21

The channel type for DTMB (terrestrial).

Constant Value: "TYPE_DTMB"

public static final String TYPE_DVB_C

Added in API level 21

The channel type for DVB-C (cable).

Constant Value: "TYPE_DVB_C"

public static final String TYPE_DVB_C2

Added in API level 21

The channel type for DVB-C2 (cable).

Constant Value: "TYPE_DVB_C2"

public static final String TYPE_DVB_H

Added in API level 21

The channel type for DVB-H (handheld).

Constant Value: "TYPE_DVB_H"

public static final String TYPE_DVB_S

Added in API level 21

The channel type for DVB-S (satellite).

Constant Value: "TYPE_DVB_S"

public static final String TYPE_DVB_S2

Added in API level 21

The channel type for DVB-S2 (satellite).

Constant Value: "TYPE_DVB_S2"

public static final String TYPE_DVB_SH

Added in API level 21

The channel type for DVB-SH (satellite).

Constant Value: "TYPE_DVB_SH"

public static final String TYPE_DVB_T

Added in API level 21

The channel type for DVB-T (terrestrial).

Constant Value: "TYPE_DVB_T"

public static final String TYPE_DVB_T2

Added in API level 21

The channel type for DVB-T2 (terrestrial).

Constant Value: "TYPE_DVB_T2"

public static final String TYPE_ISDB_C

Added in API level 21

The channel type for ISDB-C (cable).

Constant Value: "TYPE_ISDB_C"

public static final String TYPE_ISDB_S

Added in API level 21

The channel type for ISDB-S (satellite).

Constant Value: "TYPE_ISDB_S"

public static final String TYPE_ISDB_T

Added in API level 21

The channel type for ISDB-T (terrestrial).

Constant Value: "TYPE_ISDB_T"

public static final String TYPE_ISDB_TB

Added in API level 21

The channel type for ISDB-Tb (Brazil).

Constant Value: "TYPE_ISDB_TB"

public static final String TYPE_NTSC

Added in API level 21

The channel type for NTSC.

Constant Value: "TYPE_NTSC"

public static final String TYPE_OTHER

Added in API level 21

A generic channel type.

Constant Value: "TYPE_OTHER"

public static final String TYPE_PAL

Added in API level 21

The channel type for PAL.

Constant Value: "TYPE_PAL"

public static final String TYPE_SECAM

Added in API level 21

The channel type for SECAM.

Constant Value: "TYPE_SECAM"

public static final String TYPE_S_DMB

Added in API level 21

The channel type for S-DMB (satellite).

Constant Value: "TYPE_S_DMB"

public static final String TYPE_T_DMB

Added in API level 21

The channel type for T-DMB (terrestrial).

Constant Value: "TYPE_T_DMB"

public static final String VIDEO_FORMAT_1080I

Added in API level 21

The video format for 1080i.

Constant Value: "VIDEO_FORMAT_1080I"

public static final String VIDEO_FORMAT_1080P

Added in API level 21

The video format for 1080p.

Constant Value: "VIDEO_FORMAT_1080P"

public static final String VIDEO_FORMAT_2160P

Added in API level 21

The video format for 2160p.

Constant Value: "VIDEO_FORMAT_2160P"

public static final String VIDEO_FORMAT_240P

Added in API level 21

The video format for 240p.

Constant Value: "VIDEO_FORMAT_240P"

public static final String VIDEO_FORMAT_360P

Added in API level 21

The video format for 360p.

Constant Value: "VIDEO_FORMAT_360P"

public static final String VIDEO_FORMAT_4320P

Added in API level 21

The video format for 4320p.

Constant Value: "VIDEO_FORMAT_4320P"

public static final String VIDEO_FORMAT_480I

Added in API level 21

The video format for 480i.

Constant Value: "VIDEO_FORMAT_480I"

public static final String VIDEO_FORMAT_480P

Added in API level 21

The video format for 480p.

Constant Value: "VIDEO_FORMAT_480P"

public static final String VIDEO_FORMAT_576I

Added in API level 21

The video format for 576i.

Constant Value: "VIDEO_FORMAT_576I"

public static final String VIDEO_FORMAT_576P

Added in API level 21

The video format for 576p.

Constant Value: "VIDEO_FORMAT_576P"

public static final String VIDEO_FORMAT_720P

Added in API level 21

The video format for 720p.

Constant Value: "VIDEO_FORMAT_720P"

public static final String VIDEO_RESOLUTION_ED

Added in API level 21

The video resolution for enhanced-definition.

Constant Value: "VIDEO_RESOLUTION_ED"

public static final String VIDEO_RESOLUTION_FHD

Added in API level 21

The video resolution for full high-definition.

Constant Value: "VIDEO_RESOLUTION_FHD"

public static final String VIDEO_RESOLUTION_HD

Added in API level 21

The video resolution for high-definition.

Constant Value: "VIDEO_RESOLUTION_HD"

public static final String VIDEO_RESOLUTION_SD

Added in API level 21

The video resolution for standard-definition.

Constant Value: "VIDEO_RESOLUTION_SD"

public static final String VIDEO_RESOLUTION_UHD

Added in API level 21

The video resolution for ultra high-definition.

Constant Value: "VIDEO_RESOLUTION_UHD"

Fields

public static final Uri CONTENT_URI

Added in API level 21

The content:// style URI for this table.

Public Methods

public static final String getVideoResolution (String videoFormat)

Added in API level 21

Returns the video resolution (definition) for a given video format.

Parameters
videoFormat The video format defined in TvContract.Channels.
Returns
  • the corresponding video resolution string. null if the resolution string is not defined for the given video format.