From a19933bc0a198949c02c7dee7ad8e9ec3d7f1146 Mon Sep 17 00:00:00 2001 From: Quddus Chong Date: Mon, 15 Jun 2015 14:06:16 -0700 Subject: docs: Updated Recommending TV Content lesson to support card customization. bug: 21787002 Change-Id: I3c94fbce2ac7efff1749b76af3da47506812972c --- docs/html/training/tv/discovery/recommendations.jd | 58 ++++++++++++++++------ 1 file changed, 43 insertions(+), 15 deletions(-) (limited to 'docs/html/training') diff --git a/docs/html/training/tv/discovery/recommendations.jd b/docs/html/training/tv/discovery/recommendations.jd index a74ee56..ffe33f2 100644 --- a/docs/html/training/tv/discovery/recommendations.jd +++ b/docs/html/training/tv/discovery/recommendations.jd @@ -10,6 +10,7 @@ trainingnavtop=true

This lesson teaches you to

    +
  1. Best Practices for Recommendations
  2. Create a Recommendations Service
  3. Build Recommendations
  4. Run Recommendations Service
  5. @@ -47,6 +48,46 @@ trainingnavtop=true Leanback sample app.

    +

    Best Practices for Recommendations

    + +

    Recommendations help users quickly find the content and apps they enjoy. Creating +recommendations that are high-quality and relevant to users is an important factor in creating a +great user experience with your TV app. For this reason, you should carefully consider what +recommendations you present to the user and manage them closely.

    + +

    Types of Recommendations

    + +

    When you create recommendations, you should link users back to incomplete viewing activities or +suggest activities that extend that to related content. Here are some specific type of +recommendations you should consider:

    + +
      +
    • Continuation content recommendations for the next episode for users to resume +watching a series.
    • +
    • New content recommendations, such as for a new first-run episode, if the user +finished watching another series. +
    • Related content recommendations based on the users historic viewing behavior. +
    + +

    For more information on how to design recommendation cards for the best user experience, see +Recommendation Row in the Android TV Design Spec.

    + +

    Refreshing Recommendations

    + +

    When refreshing recommendations, don't just remove and repost them, because doing so causes +the recommendations to appear at the end of the recommendations row. Once a content item, such as a +movie, has been played, +remove it from the recommendations.

    + +

    Customizing Recommendations

    + +

    You can customize recommendation cards to convey branding information, by setting user interface +elements such as the card's foreground and background image, color, app icon, title, and subtitle. +To learn more, see +Recommendation Row in the Android TV Design Spec.

    +

    Create a Recommendations Service

    @@ -116,8 +157,8 @@ public class UpdateRecommendationsService extends IntentService { TaskStackBuilder stackBuilder = TaskStackBuilder.create(this); stackBuilder.addParentStack(DetailsActivity.class); stackBuilder.addNextIntent(detailsIntent); - // Ensure a unique PendingIntents, otherwise all recommendations end up with the same - // PendingIntent + // Ensure a unique PendingIntents, otherwise all + // recommendations end up with the same PendingIntent detailsIntent.setAction(Long.toString(movie.getId())); PendingIntent intent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT); @@ -143,19 +184,6 @@ public class UpdateRecommendationsService extends IntentService { </manifest> -

    Refreshing Recommendations

    - -

    Base your recommendations on user behavior and data such as play lists, wish lists, and associated -content. When refreshing recommendations, don't just remove and repost them, because doing so causes -the recommendations to appear at the end of the recommendations row. Once a content item, such as a -movie, has been played, -remove it from the recommendations.

    - -

    The order of an app's recommendations is preserved according to the order in which the app -provides them. The framework interleaves app recommendations based on recommendation quality, -as measured by user behavior. Better recommendations make an app's recommendations more likely -to appear near the front of the list.

    -

    Build Recommendations

    -- cgit v1.1