From 81c754a54a6e06541d5410a3a965e5a5b84cf33f Mon Sep 17 00:00:00 2001 From: Jae Seo Date: Thu, 18 Jun 2015 13:45:35 -0700 Subject: [PATCH] TIF: Add the columns for the app-linking to TvContract.Channels 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. Bug: 21884742 Change-Id: Iabeea57884c63ac31ee164c27c6e2fe1860f15f6 --- api/current.txt | 5 + api/system-current.txt | 5 + media/java/android/media/tv/TvContract.java | 104 ++++++++++++++++++++ 3 files changed, 114 insertions(+) diff --git a/api/current.txt b/api/current.txt index a0dccd5963a11..12088dbbf82ea 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 7e3e051e6a4af..9e9e5df67e846 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 91b1a49d9a7eb..3c5aebb30fd09 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; @@ -707,6 +708,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. *