diff --git a/api/current.txt b/api/current.txt index 3a50ed7bddfb1..ec961bedcc1b8 100644 --- a/api/current.txt +++ b/api/current.txt @@ -17698,6 +17698,11 @@ package android.media.tv { public static final class TvContract.Channels implements android.media.tv.TvContract.BaseTvColumns { method public static final java.lang.String getVideoResolution(java.lang.String); + field public static final java.lang.String COLUMN_APP_LINK_COLOR = "app_link_color"; + field public static final java.lang.String COLUMN_APP_LINK_ICON_URI = "app_link_icon_uri"; + field public static final java.lang.String COLUMN_APP_LINK_INTENT_URI = "app_link_intent_uri"; + field public static final java.lang.String COLUMN_APP_LINK_POSTER_ART_URI = "app_link_poster_art_uri"; + field public static final java.lang.String COLUMN_APP_LINK_TEXT = "app_link_text"; field public static final java.lang.String COLUMN_DESCRIPTION = "description"; field public static final java.lang.String COLUMN_DISPLAY_NAME = "display_name"; field public static final java.lang.String COLUMN_DISPLAY_NUMBER = "display_number"; diff --git a/api/system-current.txt b/api/system-current.txt index 3f33f711c005f..7411cd15a321a 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -19035,6 +19035,11 @@ package android.media.tv { public static final class TvContract.Channels implements android.media.tv.TvContract.BaseTvColumns { method public static final java.lang.String getVideoResolution(java.lang.String); + field public static final java.lang.String COLUMN_APP_LINK_COLOR = "app_link_color"; + field public static final java.lang.String COLUMN_APP_LINK_ICON_URI = "app_link_icon_uri"; + field public static final java.lang.String COLUMN_APP_LINK_INTENT_URI = "app_link_intent_uri"; + field public static final java.lang.String COLUMN_APP_LINK_POSTER_ART_URI = "app_link_poster_art_uri"; + field public static final java.lang.String COLUMN_APP_LINK_TEXT = "app_link_text"; field public static final java.lang.String COLUMN_BROWSABLE = "browsable"; field public static final java.lang.String COLUMN_DESCRIPTION = "description"; field public static final java.lang.String COLUMN_DISPLAY_NAME = "display_name"; diff --git a/media/java/android/media/tv/TvContract.java b/media/java/android/media/tv/TvContract.java index 5bd7908a48e7c..a06f8483b7c6c 100644 --- a/media/java/android/media/tv/TvContract.java +++ b/media/java/android/media/tv/TvContract.java @@ -21,6 +21,7 @@ import android.annotation.SystemApi; import android.content.ComponentName; import android.content.ContentResolver; import android.content.ContentUris; +import android.content.Intent; import android.net.Uri; import android.os.IBinder; import android.provider.BaseColumns; @@ -708,6 +709,109 @@ public final class TvContract { @SystemApi public static final String COLUMN_LOCKED = "locked"; + /** + * The app badge icon of the app link template for this channel. + * + *

This small icon is overlaid at the bottom of the poster art specified by + * {@link #COLUMN_APP_LINK_POSTER_ART_URI}. The data in the column must be a URI in one of + * the following formats: + * + *

+ * + *

The app-linking allows channel input sources to provide activity links from their live + * channel programming to another activity. This enables content providers to increase user + * engagement by offering the viewer other content or actions. + * + *

Type: TEXT + * @see #COLUMN_APP_LINK_COLOR + * @see #COLUMN_APP_LINK_INTENT_URI + * @see #COLUMN_APP_LINK_POSTER_ART_URI + * @see #COLUMN_APP_LINK_TEXT + */ + public static final String COLUMN_APP_LINK_ICON_URI = "app_link_icon_uri"; + + /** + * The poster art used as the background of the app link template for this channel. + * + *

The data in the column must be a URL or a URI in one of the following formats: + * + *

+ * + *

The app-linking allows channel input sources to provide activity links from their live + * channel programming to another activity. This enables content providers to increase user + * engagement by offering the viewer other content or actions. + * + *

Type: TEXT + * @see #COLUMN_APP_LINK_COLOR + * @see #COLUMN_APP_LINK_ICON_URI + * @see #COLUMN_APP_LINK_INTENT_URI + * @see #COLUMN_APP_LINK_TEXT + */ + public static final String COLUMN_APP_LINK_POSTER_ART_URI = "app_link_poster_art_uri"; + + /** + * The link text of the app link template for this channel. + * + *

This provides a short description of the action that happens when the corresponding + * app link is clicked. + * + *

The app-linking allows channel input sources to provide activity links from their live + * channel programming to another activity. This enables content providers to increase user + * engagement by offering the viewer other content or actions. + * + *

Type: TEXT + * @see #COLUMN_APP_LINK_COLOR + * @see #COLUMN_APP_LINK_ICON_URI + * @see #COLUMN_APP_LINK_INTENT_URI + * @see #COLUMN_APP_LINK_POSTER_ART_URI + */ + public static final String COLUMN_APP_LINK_TEXT = "app_link_text"; + + /** + * The accent color of the app link template for this channel. This is primarily used for + * the background color of the text box in the template. + * + *

The app-linking allows channel input sources to provide activity links from their live + * channel programming to another activity. This enables content providers to increase user + * engagement by offering the viewer other content or actions. + * + *

Type: INTEGER (color value) + * @see #COLUMN_APP_LINK_ICON_URI + * @see #COLUMN_APP_LINK_INTENT_URI + * @see #COLUMN_APP_LINK_POSTER_ART_URI + * @see #COLUMN_APP_LINK_TEXT + */ + public static final String COLUMN_APP_LINK_COLOR = "app_link_color"; + + /** + * The intent URI of the app link for this channel. + * + *

The URI is created using {@link Intent#toUri} with {@link Intent#URI_INTENT_SCHEME} + * and converted back to the original intent with {@link Intent#parseUri}. The intent is + * launched when the user clicks the corresponding app link for the current channel. + * + *

The app-linking allows channel input sources to provide activity links from their live + * channel programming to another activity. This enables content providers to increase user + * engagement by offering the viewer other content or actions. + * + *

Type: TEXT + * @see #COLUMN_APP_LINK_COLOR + * @see #COLUMN_APP_LINK_ICON_URI + * @see #COLUMN_APP_LINK_POSTER_ART_URI + * @see #COLUMN_APP_LINK_TEXT + */ + public static final String COLUMN_APP_LINK_INTENT_URI = "app_link_intent_uri"; + /** * Internal data used by individual TV input services. *