diff --git a/docs/html/images/training/tv/tif/app-link-2x.png b/docs/html/images/training/tv/tif/app-link-2x.png new file mode 100644 index 0000000000000..d9d058231b142 Binary files /dev/null and b/docs/html/images/training/tv/tif/app-link-2x.png differ diff --git a/docs/html/images/training/tv/tif/app-link-diagram.png b/docs/html/images/training/tv/tif/app-link-diagram.png new file mode 100644 index 0000000000000..92328adfcd7c8 Binary files /dev/null and b/docs/html/images/training/tv/tif/app-link-diagram.png differ diff --git a/docs/html/images/training/tv/tif/app-link.png b/docs/html/images/training/tv/tif/app-link.png new file mode 100644 index 0000000000000..7573a188b03e6 Binary files /dev/null and b/docs/html/images/training/tv/tif/app-link.png differ diff --git a/docs/html/training/tv/tif/channel.jd b/docs/html/training/tv/tif/channel.jd index 999f1ca9c5c5e..59e357a316ac0 100644 --- a/docs/html/training/tv/tif/channel.jd +++ b/docs/html/training/tv/tif/channel.jd @@ -13,6 +13,7 @@ trainingnavtop=true
Your TV input must provide Electronic Program Guide (EPG) data for at least one channel in its -setup activity. You should also periodically update that data, with consideration for the size of -the update and the processing thread that handles it. This lesson discusses creating and updating -channel and program data on the system database with these considerations in mind.
+Your TV input must provide Electronic Program Guide (EPG) data for at least +one channel in its setup activity. You should also periodically update that +data, with consideration for the size of the update and the processing thread +that handles it. Additionally, you can provide app links for channels +that guide the user to related content and activities. +This lesson discusses creating and updating channel and program data on the +system database with these considerations in mind.
@@ -70,6 +74,10 @@ addition to those above to better identify traditional broadcast channels: ID
If you want to provide app link details for your channels, you need to +update some additional fields. For more information on app link fields, see +Add App Link Information. +
For internet streaming based TV inputs, assign your own values to the above accordingly so that each channel can be identified uniquely.
@@ -236,4 +244,112 @@ Android TV live TV sample app for an example.Other techniques to separate the data update tasks from the UI thread include using the {@link android.os.HandlerThread} class, or you may implement your own using {@link android.os.Looper} and {@link android.os.Handler} classes. See -Processes and Threads for more information.
\ No newline at end of file +Processes and Threads for more information. + +Channels can use app links to let users easily launch a related +activity while they are watching channel content. Channel apps use +app links to extend user engagement by launching activities that show +related information or additional content. For example, you can use app links +to do the following:
+ +App links are displayed when the user presses Select to show the +TV menu while watching channel content.
+ +
+Figure 1. An example app link +displayed on the Channels row while channel content is shown.
+ +When the user selects the app link, the system starts an activity using +an intent URI specified by the channel app. Channel content continues to play +while the app link activity is active. The user can return to the channel +content by pressing Back.
+ +Android TV automatically creates an app link for each channel, +using information from the channel data. To provide app link information, +specify the following details in your +{@link android.media.tv.TvContract.Channels} fields: +
+ +
+Figure 2. App link details.
+ +If the channel data doesn't specify app link information, the system +creates a default app link. The system chooses default details as follows:
+ +You specify app link details for your channels in your app's +setup activity. You can update these app link details at any point, so +if an app link needs to match channel changes, update app +link details and call +{@link android.content.ContentResolver#update(android.net.Uri, +android.content.ContentValues, java.lang.String, java.lang.String[]) +ContentResolver.update()} as needed. For more details on updating +channel data, see Update Channel Data. +
+ + + diff --git a/docs/image_sources/training/tv/tif/app-link-diagram.graffle.zip b/docs/image_sources/training/tv/tif/app-link-diagram.graffle.zip new file mode 100644 index 0000000000000..8b6779d68c1c1 Binary files /dev/null and b/docs/image_sources/training/tv/tif/app-link-diagram.graffle.zip differ