# TvContractCompat

Artifact: [androidx.tvprovider:tvprovider](https://developer.android.com/jetpack/androidx/releases/tvprovider) [View Source](https://cs.android.com/search?q=file:androidx/tvprovider/media/tv/TvContractCompat.java+class:androidx.tvprovider.media.tv.TvContractCompat) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

*** ** * ** ***

<br />

```
public final class TvContractCompat
```

<br />

*** ** * ** ***

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 `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Channels` and `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Programs` tables.

- A row in the `https://developer.android.com/reference/androidx/tvprovider/media/tv/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 `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Programs` table represents a set of data describing a TV program such as program title and start time.

## Summary

| ### Nested types |
|---|
| `public interface https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.BaseTvColumns extends https://developer.android.com/reference/android/provider/BaseColumns.html` Common base for the tables of TV channels/programs. |
| `public final class https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Channels implements https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.BaseTvColumns` Column definitions for the TV channels table. |
| `public final class https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Channels.Logo` A sub-directory of a single TV channel that represents its primary logo. |
| `public interface https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.PreviewProgramColumns` Common columns for the tables of preview programs. |
| `public final class https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.PreviewPrograms implements https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.BaseTvColumns, https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.PreviewProgramColumns` Column definitions for the preview TV programs table. |
| `public final class https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Programs implements https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.BaseTvColumns` Column definitions for the TV programs table. |
| `public final class https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Programs.Genres` Canonical genres for TV programs. |
| `public final class https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.RecordedPrograms implements https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.BaseTvColumns` Column definitions for the recorded TV programs table. |
| `public final class https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.WatchNextPrograms implements https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.BaseTvColumns, https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.PreviewProgramColumns` Column definitions for the "watch next" TV programs table. |

| ### Constants |
|---|---|
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#ACTION_INITIALIZE_PROGRAMS() = "android.media.tv.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. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#ACTION_PREVIEW_PROGRAM_ADDED_TO_WATCH_NEXT() = "android.media.tv.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. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#ACTION_PREVIEW_PROGRAM_BROWSABLE_DISABLED() = "android.media.tv.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. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#ACTION_REQUEST_CHANNEL_BROWSABLE() = "android.media.tv.action.REQUEST_CHANNEL_BROWSABLE"` Activity Action: sent by an application telling the system to make the given channel browsable with user interaction. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#ACTION_WATCH_NEXT_PROGRAM_BROWSABLE_DISABLED() = "android.media.tv.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. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#AUTHORITY() = "android.media.tv"` The authority for the TV provider. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#EXTRA_CHANNEL_ID() = "android.media.tv.extra.CHANNEL_ID"` The key for a bundle parameter containing a channel ID as a long integer |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#EXTRA_PREVIEW_PROGRAM_ID() = "android.media.tv.extra.PREVIEW_PROGRAM_ID"` The key for a bundle parameter containing a program ID as a long integer. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#EXTRA_WATCH_NEXT_PROGRAM_ID() = "android.media.tv.extra.WATCH_NEXT_PROGRAM_ID"` The key for a bundle parameter containing a watch next program ID as a long integer. |

| ### Public methods |
|---|---|
| `static https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#buildChannelLogoUri(long)(long channelId)` Builds a URI that points to a channel logo. |
| `static https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#buildChannelLogoUri(android.net.Uri)(https://developer.android.com/reference/android/net/Uri.html channelUri)` Builds a URI that points to a channel logo. |
| `static https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#buildChannelUri(long)(long channelId)` Builds a URI that points to a specific channel. |
| `static https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#buildChannelUriForPassthroughInput(java.lang.String)(https://developer.android.com/reference/java/lang/String.html inputId)` Build a special channel URI intended to be used with pass-through inputs. |
| `static https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#buildChannelsUriForInput(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html inputId)` Builds a URI that points to all channels from a given TV input. |
| `static https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#buildInputId(android.content.ComponentName)(https://developer.android.com/reference/android/content/ComponentName.html name)` Builds an ID that uniquely identifies a TV input service. |
| `static https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#buildPreviewProgramUri(long)(long previewProgramId)` Builds a URI that points to a specific preview program. |
| `static https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#buildPreviewProgramsUriForChannel(long)(long channelId)` Builds a URI that points to all preview programs on a given channel. |
| `static https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#buildPreviewProgramsUriForChannel(android.net.Uri)(https://developer.android.com/reference/android/net/Uri.html channelUri)` Builds a URI that points to all preview programs on a given channel. |
| `static https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#buildProgramUri(long)(long programId)` Builds a URI that points to a specific program. |
| `static https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#buildProgramsUriForChannel(long)(long channelId)` Builds a URI that points to all programs on a given channel. |
| `static https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#buildProgramsUriForChannel(android.net.Uri)(https://developer.android.com/reference/android/net/Uri.html channelUri)` Builds a URI that points to all programs on a given channel. |
| `static https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#buildProgramsUriForChannel(long,long,long)(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 https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#buildProgramsUriForChannel(android.net.Uri,long,long)(https://developer.android.com/reference/android/net/Uri.html 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 https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#buildRecordedProgramUri(long)(long recordedProgramId)` Builds a URI that points to a specific recorded program. |
| `static https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#buildWatchNextProgramUri(long)(long watchNextProgramId)` Builds a URI that points to a specific watch next program. |
| `static boolean` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#isChannelUri(android.net.Uri)(https://developer.android.com/reference/android/net/Uri.html uri)` Returns `true`, if `uri` is a channel URI. |
| `static boolean` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#isChannelUriForPassthroughInput(android.net.Uri)(https://developer.android.com/reference/android/net/Uri.html uri)` Returns `true`, if `uri` is a channel URI for a pass-through input. |
| `static boolean` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#isChannelUriForTunerInput(android.net.Uri)(https://developer.android.com/reference/android/net/Uri.html uri)` Returns `true`, if `uri` is a channel URI for a tuner input. |
| `static boolean` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#isProgramUri(android.net.Uri)(https://developer.android.com/reference/android/net/Uri.html uri)` Returns `true`, if `uri` is a program URI. |
| `static boolean` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#isRecordedProgramUri(android.net.Uri)(https://developer.android.com/reference/android/net/Uri.html uri)` Returns `true`, if `uri` is a recorded program URI. |
| `static void` | `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#requestChannelBrowsable(android.content.Context,long)(https://developer.android.com/reference/android/content/Context.html context, long channelId)` Requests to make a channel browsable. |

## Constants

### ACTION_INITIALIZE_PROGRAMS

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static final String ACTION_INITIALIZE_PROGRAMS = "android.media.tv.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.

Note that this intent is sent only on devices with `https://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_LEANBACK` enabled. Besides that, in order to receive this intent, the target TV input must:

- Declare a broadcast receiver for this intent in its `AndroidManifest.xml`.
- Declare appropriate permissions to write channel and program data in its `AndroidManifest.xml`.

### ACTION_PREVIEW_PROGRAM_ADDED_TO_WATCH_NEXT

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static final String ACTION_PREVIEW_PROGRAM_ADDED_TO_WATCH_NEXT = "android.media.tv.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.

The intent must contain the following bundle parameters:

- `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#EXTRA_PREVIEW_PROGRAM_ID()`: the ID of the existing preview program.
- `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#EXTRA_WATCH_NEXT_PROGRAM_ID()`: the ID of the new watch next program.

### ACTION_PREVIEW_PROGRAM_BROWSABLE_DISABLED

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static final String ACTION_PREVIEW_PROGRAM_BROWSABLE_DISABLED = "android.media.tv.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. The input is expected to delete the preview program from the content provider.

The intent must contain the following bundle parameter:

- `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#EXTRA_PREVIEW_PROGRAM_ID()`: the disabled preview program ID.

### ACTION_REQUEST_CHANNEL_BROWSABLE

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static final String ACTION_REQUEST_CHANNEL_BROWSABLE = "android.media.tv.action.REQUEST_CHANNEL_BROWSABLE"
```

Activity Action: sent by an application telling the system to make the given channel browsable with user interaction. The system may show UI to ask user to approve the channel. This is only relevant to channels with `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Channels#TYPE_PREVIEW()` type. Use `https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)` to get the result of the request.

The intent must contain the following bundle parameters:

- `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#EXTRA_CHANNEL_ID()`: ID for the `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Channels#TYPE_PREVIEW()` channel as a long integer.

### ACTION_WATCH_NEXT_PROGRAM_BROWSABLE_DISABLED

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static final String ACTION_WATCH_NEXT_PROGRAM_BROWSABLE_DISABLED = "android.media.tv.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. The input is expected to delete the "watch next" program from the content provider.

The intent must contain the following bundle parameter:

- `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat#EXTRA_WATCH_NEXT_PROGRAM_ID()`: the disabled "watch next" program ID.

### AUTHORITY

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static final String AUTHORITY = "android.media.tv"
```

The authority for the TV provider.

### EXTRA_CHANNEL_ID

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static final String EXTRA_CHANNEL_ID = "android.media.tv.extra.CHANNEL_ID"
```

The key for a bundle parameter containing a channel ID as a long integer

### EXTRA_PREVIEW_PROGRAM_ID

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static final String EXTRA_PREVIEW_PROGRAM_ID = "android.media.tv.extra.PREVIEW_PROGRAM_ID"
```

The key for a bundle parameter containing a program ID as a long integer.

### EXTRA_WATCH_NEXT_PROGRAM_ID

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static final String EXTRA_WATCH_NEXT_PROGRAM_ID = "android.media.tv.extra.WATCH_NEXT_PROGRAM_ID"
```

The key for a bundle parameter containing a watch next program ID as a long integer.

## Public methods

### buildChannelLogoUri

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static Uri buildChannelLogoUri(long channelId)
```

Builds a URI that points to a channel logo. See `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Channels.Logo`.

| Parameters |
|---|---|
| `long channelId` | The ID of the channel whose logo is pointed to. |

### buildChannelLogoUri

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static Uri buildChannelLogoUri(Uri channelUri)
```

Builds a URI that points to a channel logo. See `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Channels.Logo`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/android/net/Uri.html channelUri` | The URI of the channel whose logo is pointed to. |

### buildChannelUri

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static Uri buildChannelUri(long channelId)
```

Builds a URI that points to a specific channel.

| Parameters |
|---|---|
| `long channelId` | The ID of the channel to point to. |

### buildChannelUriForPassthroughInput

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static Uri buildChannelUriForPassthroughInput(String inputId)
```

Build a special channel URI intended to be used with pass-through inputs. (e.g. HDMI)

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html inputId` | The ID of the pass-through input to build a channels URI for. |

### buildChannelsUriForInput

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static Uri buildChannelsUriForInput(@Nullable String inputId)
```

Builds a URI that points to all channels from a given TV input.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/String.html inputId` | The ID of the TV input to build a channels URI for. If `null`, builds a URI for all the TV inputs. |

### buildInputId

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static String buildInputId(ComponentName name)
```

Builds an ID that uniquely identifies a TV input service.

| Parameters |
|---|---|
| `https://developer.android.com/reference/android/content/ComponentName.html name` | The `https://developer.android.com/reference/android/content/ComponentName.html` of the TV input service to build ID for. |

| Returns |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html` | the ID for the given TV input service. |

### buildPreviewProgramUri

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static Uri buildPreviewProgramUri(long previewProgramId)
```

Builds a URI that points to a specific preview program.

| Parameters |
|---|---|
| `long previewProgramId` | The ID of the preview program to point to. |

### buildPreviewProgramsUriForChannel

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static Uri buildPreviewProgramsUriForChannel(long channelId)
```

Builds a URI that points to all preview programs on a given channel.

| Parameters |
|---|---|
| `long channelId` | The ID of the channel to return preview programs for. |

### buildPreviewProgramsUriForChannel

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static Uri buildPreviewProgramsUriForChannel(Uri channelUri)
```

Builds a URI that points to all preview programs on a given channel.

| Parameters |
|---|---|
| `https://developer.android.com/reference/android/net/Uri.html channelUri` | The URI of the channel to return preview programs for. |

### buildProgramUri

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static Uri buildProgramUri(long programId)
```

Builds a URI that points to a specific program.

| Parameters |
|---|---|
| `long programId` | The ID of the program to point to. |

### buildProgramsUriForChannel

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static Uri buildProgramsUriForChannel(long channelId)
```

Builds a URI that points to all programs on a given channel.

| Parameters |
|---|---|
| `long channelId` | The ID of the channel to return programs for. |

### buildProgramsUriForChannel

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static Uri buildProgramsUriForChannel(Uri channelUri)
```

Builds a URI that points to all programs on a given channel.

| Parameters |
|---|---|
| `https://developer.android.com/reference/android/net/Uri.html channelUri` | The URI of the channel to return programs for. |

### buildProgramsUriForChannel

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static 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 |
|---|---|
| `long channelId` | The ID of the channel to return programs for. |
| `long startTime` | The start time used to filter programs. The returned programs should have `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Programs#COLUMN_END_TIME_UTC_MILLIS()` that is greater than or equal to this time. |
| `long endTime` | The end time used to filter programs. The returned programs should have `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Programs#COLUMN_START_TIME_UTC_MILLIS()` that is less than or equal to this time. |

### buildProgramsUriForChannel

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static 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 |
|---|---|
| `https://developer.android.com/reference/android/net/Uri.html channelUri` | The URI of the channel to return programs for. |
| `long startTime` | The start time used to filter programs. The returned programs should have `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Programs#COLUMN_END_TIME_UTC_MILLIS()` that is greater than or equal to this time. |
| `long endTime` | The end time used to filter programs. The returned programs should have `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Programs#COLUMN_START_TIME_UTC_MILLIS()` that is less than or equal to this time. |

### buildRecordedProgramUri

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static Uri buildRecordedProgramUri(long recordedProgramId)
```

Builds a URI that points to a specific recorded program.

| Parameters |
|---|---|
| `long recordedProgramId` | The ID of the recorded program to point to. |

### buildWatchNextProgramUri

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static Uri buildWatchNextProgramUri(long watchNextProgramId)
```

Builds a URI that points to a specific watch next program.

| Parameters |
|---|---|
| `long watchNextProgramId` | The ID of the watch next program to point to. |

### isChannelUri

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static boolean isChannelUri(Uri uri)
```

Returns `true`, if `uri` is a channel URI.

### isChannelUriForPassthroughInput

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static boolean isChannelUriForPassthroughInput(Uri uri)
```

Returns `true`, if `uri` is a channel URI for a pass-through input.

### isChannelUriForTunerInput

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static boolean isChannelUriForTunerInput(Uri uri)
```

Returns `true`, if `uri` is a channel URI for a tuner input.

### isProgramUri

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static boolean isProgramUri(Uri uri)
```

Returns `true`, if `uri` is a program URI.

### isRecordedProgramUri

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static boolean isRecordedProgramUri(Uri uri)
```

Returns `true`, if `uri` is a recorded program URI.

### requestChannelBrowsable

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/tvprovider#1.1.0)

```
public static void requestChannelBrowsable(Context context, long channelId)
```

Requests to make a channel browsable.

Once called, the system will review the request and make the channel browsable based on its policy. The first request from a package is guaranteed to be approved. This is only relevant to channels with `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Channels#TYPE_PREVIEW()` type.

No-op on devices prior to `https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#O`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/android/content/Context.html context` | The context for accessing content provider. |
| `long channelId` | The channel ID to be browsable. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/tvprovider/media/tv/TvContractCompat.Channels#COLUMN_BROWSABLE()` |   |