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
  • Get Permission
  • Register Channels in the Database
  • Update Channel Data
  • +
  • Add App Link Information
  • Try It Out

    +

    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.

    + +

    Provide App Link Channel Data

    + +

    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