No se han encontrado resultados
In the first part of this series we learned how easy is to create a new Android App for Amazon Fire TV and how to run it for the first time using the Android Studio Wizard for Leanback-Enabled apps in a matter of a few minutes.
We’ll now deep dive into what the main components of this app are and how they interact with each other.
After we have created a new TV project using the Android Studio Wizard, we can notice that the wizard has automatically included some libraries in our project dependencies.
Your build.gradle file will look like this:
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:leanback-v17:23.4.0' compile 'com.android.support:recyclerview-v7:23.4.0' compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.github.bumptech.glide:glide:3.4.+' }
Let’s understand why each one of these libraries is important in a Leanback-enabled project:
All these components are the main building blocks to create a solid and consistent TV experience for users, and in the process of developing an App for Fire TV we will fully explore their capabilities and functions.
Let’s see what the classic interaction model is when users want to play content using a Media Streaming App.
The user journey is composed by three main steps:
A Leanback-enabled Android App follows this interaction model, and in fact the three main components of a Leanback-enabled app are exactly covering the three main steps of the Media Streaming App interaction model:
This 1:1 mapping with the Media Streaming App interaction model provides developers a consistent project structure, which highly simplifies the app design and development process.
Using a well-defined app structure like the one provided by the Leanback approach also allows an easier onboarding process since there is a high chance that users will have already been interacting with Media Streaming Apps built following the same pattern.
In the next episode of this series we’ll deep-dive into the first of the main components of a Leanback-enabled app, the BrowseFragment. We will learn how to build the main interface of our TV app and how to make the streaming content available for browsing.
For more information about developing for the 10-foot experience, check out our Design and User Experience Guidelines.
Mario Viviani (@mariuxtheone)