SlideShare a Scribd company logo
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Working with Android TV
Pedro Vicente Gómez Sánchez
Android Expert at Karumi
pedro@karumi.com
@pedro_g_s
github.com/pedrovgs
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Are we going to develop always for
smartphones?
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
https://developer.android.com/tv/adt-1/index.html
Nexus Player
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
● Introduction.
● First steps.
● Thinking different.
● BrowseFragment.
● DetailsFragment.
● SearchFragment.
● Recommendations.
● Without Leanback library.
Agenda
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
● Nexus Player supports API level 21 or higher.
● Leanback library is really useful. Almost essential.
● Easy to work with if you don’t want to do something different.
● Forget about touch your TV.
Introduction
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
First steps
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Add Leanback library to your project:
First steps
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
First steps
Configure an Activity to use “LEANBACK_LAUNCHER” intent filter:
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Thinking different:
Try to use your smartphone without touch it!
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Try to avoid the keyboard:
Thinking different
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Thinking different
All the user experience is going to be related to the focus usage.
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
You have a microphone, use it.
Thinking different
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Use the background, it’s a powerful tool.
Thinking different
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Use content recommendations.
Thinking different
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Leanback Library
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
BrowseFragment
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
DetailFragment
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
SearchFragment
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
How can I use these Fragments?
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
BrowseFragment
Create your own Fragment and extend from Leanback BrowseFragment:
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
BrowseFragment
Configure your user interface to apply your application colors and icons:
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
BrowseFragment
Once you have loaded all the content, configure one ArrayObjectAdapter with
your data:
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
BrowseFragment
Each row is going to be represented with one “ArrayObjectAdapter”, one
“HeaderItem” and one “Presenter”:
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
BrowseFragment
Configure your listeners to
change your user
interface when one
element is selected or
clicked.
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
DetailsFragment
Create your own Fragment and extend from Leanback DetailsFragment:
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
DetailsFragment
Configure DetailsFragment background to be updated when needed:
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
DetailsFragment
Show detailed information using the same approach we use with
BrowseFragment based on ArrayObjectAdapter:
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
DetailsFragment
Add actions if needed:
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
SearchFragment
Create your own Fragment and extend from Leanback SearchFragment:
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
SearchFragment
To be able to react to user clicks you have to configure a
OnItemViewClickedListener instance:
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
SearchFragment
Override some methods
to perform your search
and indicate the adapter
you are going to use to
show search information.
Your fragment has to
implement Leanback
SearchResultProvider
interface.
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Android Presenters
Android Presenters are the base of how your data is shown inside Leanback Fragments.
You can use some widgets from Leanback library or create your own presenters.
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Recommendations
Android gives you the
opportunity to show
content
recommendations to
your users. This
mechanism is based
on classic Android
notifications.
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Without Leanback library
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Without Leanback library
One of the problems related to the Leanback usage is that all your applications are going to be
really similar. If you want to do something different, you’ll have to use your imagination.
Some interesting ideas:
● Use the focus and selectors to give more information to the user.
● State list animator is going to be your new best friend.
● Some elements will have to be focusables and disable the focus on
runtime could be needed.
● Change your backgrounds with cool images to provide more context to
the user.
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Without Leanback library:
Focus
NextFocusX configuration is
going to be really useful for
your UI.
RequestFocus xml label will
provide you more flexibility.
Remember to enable
focusable in some of your
views, default state is false in
some views.
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Without Leanback library:
State List Animators
If you want to improve how
your users know what’s the
elemen it selected and you
are not using a Leanback
widget, you can use state list
animators to animate your
widgets when one get or lose
the focus.
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Without Leanback library:
Use focus programmatically
Use “getCurrentFocus()”
method to know which is the
view with the focus and don’
t be afraid to change
“focusable” attribute of your
views to create a better user
experience.
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Without Leanback library:
Backgrounds
To be able to provide more information to the user about the current context you can change the
Activity/Fragment background.
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
https://www.github.com/pedrovgs/TuentiTV
Show me the code!
Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
Questions?

More Related Content

What's hot

From zero to hero with kotlin & spring boot
From zero to hero with kotlin & spring bootFrom zero to hero with kotlin & spring boot
From zero to hero with kotlin & spring boot
Debora Gomez Bertoli
 
Becoming an Advanced Groovy Developer Spring One 2gx 2015
Becoming an Advanced Groovy Developer Spring One 2gx 2015Becoming an Advanced Groovy Developer Spring One 2gx 2015
Becoming an Advanced Groovy Developer Spring One 2gx 2015
Tom Henricksen
 
Frontend Development vs Backend Development | Detailed Comparison
Frontend Development vs Backend Development | Detailed ComparisonFrontend Development vs Backend Development | Detailed Comparison
Frontend Development vs Backend Development | Detailed Comparison
Mariya James
 
Usando gradle a seu favor
Usando gradle a seu favorUsando gradle a seu favor
Usando gradle a seu favor
Rodrigo de Souza Castro
 
Managing and evolving JavaScript Code
Managing and evolving JavaScript CodeManaging and evolving JavaScript Code
Managing and evolving JavaScript Code
Jean Carlo Emer
 
Why reactive programing matter, and how PicCollage adaptive it.
Why reactive programing matter, and how PicCollage adaptive it.Why reactive programing matter, and how PicCollage adaptive it.
Why reactive programing matter, and how PicCollage adaptive it.
PRADA Hsiung
 
Testing stage. being ahead business with cucumber
Testing stage. being ahead business with cucumberTesting stage. being ahead business with cucumber
Testing stage. being ahead business with cucumber
Alex Mikitenko
 
Mukesh b.e (cse)
Mukesh b.e (cse)Mukesh b.e (cse)
Mukesh b.e (cse)
mukesh gaud
 
The building blocks of the next web
The building blocks of the next webThe building blocks of the next web
The building blocks of the next web
Pier Paolo Orioli
 
20180524 Android Taipei : RxJava Threading
20180524 Android Taipei : RxJava Threading20180524 Android Taipei : RxJava Threading
20180524 Android Taipei : RxJava Threading
PRADA Hsiung
 
Fearless Internationalization and Localization Across the Nations
Fearless Internationalization and Localization Across the NationsFearless Internationalization and Localization Across the Nations
Fearless Internationalization and Localization Across the Nations
Siena Aguayo
 

What's hot (11)

From zero to hero with kotlin & spring boot
From zero to hero with kotlin & spring bootFrom zero to hero with kotlin & spring boot
From zero to hero with kotlin & spring boot
 
Becoming an Advanced Groovy Developer Spring One 2gx 2015
Becoming an Advanced Groovy Developer Spring One 2gx 2015Becoming an Advanced Groovy Developer Spring One 2gx 2015
Becoming an Advanced Groovy Developer Spring One 2gx 2015
 
Frontend Development vs Backend Development | Detailed Comparison
Frontend Development vs Backend Development | Detailed ComparisonFrontend Development vs Backend Development | Detailed Comparison
Frontend Development vs Backend Development | Detailed Comparison
 
Usando gradle a seu favor
Usando gradle a seu favorUsando gradle a seu favor
Usando gradle a seu favor
 
Managing and evolving JavaScript Code
Managing and evolving JavaScript CodeManaging and evolving JavaScript Code
Managing and evolving JavaScript Code
 
Why reactive programing matter, and how PicCollage adaptive it.
Why reactive programing matter, and how PicCollage adaptive it.Why reactive programing matter, and how PicCollage adaptive it.
Why reactive programing matter, and how PicCollage adaptive it.
 
Testing stage. being ahead business with cucumber
Testing stage. being ahead business with cucumberTesting stage. being ahead business with cucumber
Testing stage. being ahead business with cucumber
 
Mukesh b.e (cse)
Mukesh b.e (cse)Mukesh b.e (cse)
Mukesh b.e (cse)
 
The building blocks of the next web
The building blocks of the next webThe building blocks of the next web
The building blocks of the next web
 
20180524 Android Taipei : RxJava Threading
20180524 Android Taipei : RxJava Threading20180524 Android Taipei : RxJava Threading
20180524 Android Taipei : RxJava Threading
 
Fearless Internationalization and Localization Across the Nations
Fearless Internationalization and Localization Across the NationsFearless Internationalization and Localization Across the Nations
Fearless Internationalization and Localization Across the Nations
 

Viewers also liked

TV design guidelines
TV design guidelinesTV design guidelines
TV design guidelinesYukio Andoh
 
Android tv
Android tvAndroid tv
Getting your app on Android TV
Getting your app on Android TVGetting your app on Android TV
Getting your app on Android TV
Xavier Hallade
 
Android TV: Building apps with Google’s Leanback Library
Android TV: Building apps with  Google’s Leanback LibraryAndroid TV: Building apps with  Google’s Leanback Library
Android TV: Building apps with Google’s Leanback Library
Joe Birch
 
Android tv get started
Android tv get startedAndroid tv get started
Android tv get started
Ascii Huang
 
The Good Developer - Spanish
The Good Developer - SpanishThe Good Developer - Spanish
The Good Developer - Spanish
Pedro Vicente Gómez Sánchez
 
IT talk #18 Odessa: Alexey Rybakov "Android TV"
IT talk #18 Odessa: Alexey Rybakov "Android TV"IT talk #18 Odessa: Alexey Rybakov "Android TV"
IT talk #18 Odessa: Alexey Rybakov "Android TV"
Marina Peregud
 
Android TV Overview
Android TV OverviewAndroid TV Overview
Android TV Overview
Paul Trebilcox-Ruiz
 
Migrating to Android TV
Migrating to Android TVMigrating to Android TV
Migrating to Android TV
David Carver
 
Catégorisation automatisée de contenus documentaires : la ...
Catégorisation automatisée de contenus documentaires : la ...Catégorisation automatisée de contenus documentaires : la ...
Catégorisation automatisée de contenus documentaires : la ...butest
 
Android Workshop Part 1
Android Workshop Part 1Android Workshop Part 1
Android Workshop Part 1
NAILBITER
 
Introduction to Android by Demian Neidetcher
Introduction to Android by Demian NeidetcherIntroduction to Android by Demian Neidetcher
Introduction to Android by Demian Neidetcher
Matthew McCullough
 
Designing for Google TV
Designing for Google TVDesigning for Google TV
Designing for Google TV
Yukio Andoh
 
Bees Showreel
Bees ShowreelBees Showreel
Bees Showreel
bee_sinton
 
Android TV Introduction - Stockholm Android TV meetup
Android TV Introduction - Stockholm Android TV meetupAndroid TV Introduction - Stockholm Android TV meetup
Android TV Introduction - Stockholm Android TV meetup
Robert Nyman
 
Video Streaming: from the native Android player to uncoventional devices
Video Streaming: from the native Android player to uncoventional devicesVideo Streaming: from the native Android player to uncoventional devices
Video Streaming: from the native Android player to uncoventional devices
Matteo Bonifazi
 
Google Developers Summit Android TV で実現するリビングルームでのアプリ体験
Google Developers Summit   Android TV で実現するリビングルームでのアプリ体験Google Developers Summit   Android TV で実現するリビングルームでのアプリ体験
Google Developers Summit Android TV で実現するリビングルームでのアプリ体験
Takashi EGAWA
 
Introduction of Android Camera1
Introduction of Android Camera1Introduction of Android Camera1
Introduction of Android Camera1
Booch Lin
 
Mastering RecyclerView Layouts
Mastering RecyclerView LayoutsMastering RecyclerView Layouts
Mastering RecyclerView Layouts
Dave Smith
 

Viewers also liked (20)

TV design guidelines
TV design guidelinesTV design guidelines
TV design guidelines
 
Android tv
Android tvAndroid tv
Android tv
 
Getting your app on Android TV
Getting your app on Android TVGetting your app on Android TV
Getting your app on Android TV
 
Android TV: Building apps with Google’s Leanback Library
Android TV: Building apps with  Google’s Leanback LibraryAndroid TV: Building apps with  Google’s Leanback Library
Android TV: Building apps with Google’s Leanback Library
 
Android tv get started
Android tv get startedAndroid tv get started
Android tv get started
 
The Good Developer - Spanish
The Good Developer - SpanishThe Good Developer - Spanish
The Good Developer - Spanish
 
IT talk #18 Odessa: Alexey Rybakov "Android TV"
IT talk #18 Odessa: Alexey Rybakov "Android TV"IT talk #18 Odessa: Alexey Rybakov "Android TV"
IT talk #18 Odessa: Alexey Rybakov "Android TV"
 
Android TV Overview
Android TV OverviewAndroid TV Overview
Android TV Overview
 
Migrating to Android TV
Migrating to Android TVMigrating to Android TV
Migrating to Android TV
 
Catégorisation automatisée de contenus documentaires : la ...
Catégorisation automatisée de contenus documentaires : la ...Catégorisation automatisée de contenus documentaires : la ...
Catégorisation automatisée de contenus documentaires : la ...
 
Android Workshop Part 1
Android Workshop Part 1Android Workshop Part 1
Android Workshop Part 1
 
Introduction to Android by Demian Neidetcher
Introduction to Android by Demian NeidetcherIntroduction to Android by Demian Neidetcher
Introduction to Android by Demian Neidetcher
 
Designing for Google TV
Designing for Google TVDesigning for Google TV
Designing for Google TV
 
Bees Showreel
Bees ShowreelBees Showreel
Bees Showreel
 
Android TV Introduction - Stockholm Android TV meetup
Android TV Introduction - Stockholm Android TV meetupAndroid TV Introduction - Stockholm Android TV meetup
Android TV Introduction - Stockholm Android TV meetup
 
Video Streaming: from the native Android player to uncoventional devices
Video Streaming: from the native Android player to uncoventional devicesVideo Streaming: from the native Android player to uncoventional devices
Video Streaming: from the native Android player to uncoventional devices
 
Google Developers Summit Android TV で実現するリビングルームでのアプリ体験
Google Developers Summit   Android TV で実現するリビングルームでのアプリ体験Google Developers Summit   Android TV で実現するリビングルームでのアプリ体験
Google Developers Summit Android TV で実現するリビングルームでのアプリ体験
 
Introduction of Android Camera1
Introduction of Android Camera1Introduction of Android Camera1
Introduction of Android Camera1
 
Mastering RecyclerView Layouts
Mastering RecyclerView LayoutsMastering RecyclerView Layouts
Mastering RecyclerView Layouts
 
Tv ppt
Tv pptTv ppt
Tv ppt
 

Similar to Working with Android TV - English

Software Design patterns on Android English
Software Design patterns on Android EnglishSoftware Design patterns on Android English
Software Design patterns on Android English
Pedro Vicente Gómez Sánchez
 
Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008
Brendan Sera-Shriar
 
Eye em api_intro
Eye em api_introEye em api_intro
Eye em api_introEyeEm
 
Tips and tricks for using wordpress as application platform.
Tips and tricks for using wordpress as application platform.Tips and tricks for using wordpress as application platform.
Tips and tricks for using wordpress as application platform.
danwestall
 
Introduction to Responsive Web Design
Introduction to Responsive Web DesignIntroduction to Responsive Web Design
Introduction to Responsive Web Design
Clarissa Peterson
 
Advanced WordPress Optimization - iGaming Supershow 2012
Advanced WordPress Optimization - iGaming Supershow 2012Advanced WordPress Optimization - iGaming Supershow 2012
Advanced WordPress Optimization - iGaming Supershow 2012
Bastian Grimm
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
Udi Bauman
 
Responsive Web Design: the secret sauce - JavaScript Open Day Montreal - 2015...
Responsive Web Design: the secret sauce - JavaScript Open Day Montreal - 2015...Responsive Web Design: the secret sauce - JavaScript Open Day Montreal - 2015...
Responsive Web Design: the secret sauce - JavaScript Open Day Montreal - 2015...
Frédéric Harper
 
UpdatedMuhammadBilalResume.docx (1)
UpdatedMuhammadBilalResume.docx (1)UpdatedMuhammadBilalResume.docx (1)
UpdatedMuhammadBilalResume.docx (1)Muhammad Bilal Ahmed
 
Responsive Web Design, get the best out of your designs - JavaScript Open Day...
Responsive Web Design, get the best out of your designs - JavaScript Open Day...Responsive Web Design, get the best out of your designs - JavaScript Open Day...
Responsive Web Design, get the best out of your designs - JavaScript Open Day...
Frédéric Harper
 
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and GulpOptimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Matthew Davis
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
Lakshman Prasad
 
Makefiles in 2020 — Why they still matter
Makefiles in 2020 — Why they still matterMakefiles in 2020 — Why they still matter
Makefiles in 2020 — Why they still matter
Simon Brüggen
 
LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경
LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경
LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경
Mintak Son
 
Don't sh** in the Pool
Don't sh** in the PoolDon't sh** in the Pool
Don't sh** in the PoolChris Jean
 
Responsive Web Design, the secret sauce - MSDEVMTL - 2016-01-25
Responsive Web Design, the secret sauce - MSDEVMTL - 2016-01-25Responsive Web Design, the secret sauce - MSDEVMTL - 2016-01-25
Responsive Web Design, the secret sauce - MSDEVMTL - 2016-01-25
Frédéric Harper
 
Build and Deploy a Python Web App to Amazon in 30 Mins
Build and Deploy a Python Web App to Amazon in 30 MinsBuild and Deploy a Python Web App to Amazon in 30 Mins
Build and Deploy a Python Web App to Amazon in 30 Mins
Jeff Hull
 
OOScss Architecture For Rails Apps
OOScss Architecture For Rails AppsOOScss Architecture For Rails Apps
OOScss Architecture For Rails Apps
Netguru
 
WordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute WorkshopWordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute Workshop
Brendan Sera-Shriar
 

Similar to Working with Android TV - English (20)

Software Design patterns on Android English
Software Design patterns on Android EnglishSoftware Design patterns on Android English
Software Design patterns on Android English
 
Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008
 
Eye em api_intro
Eye em api_introEye em api_intro
Eye em api_intro
 
Tips and tricks for using wordpress as application platform.
Tips and tricks for using wordpress as application platform.Tips and tricks for using wordpress as application platform.
Tips and tricks for using wordpress as application platform.
 
Introduction to Responsive Web Design
Introduction to Responsive Web DesignIntroduction to Responsive Web Design
Introduction to Responsive Web Design
 
Advanced WordPress Optimization - iGaming Supershow 2012
Advanced WordPress Optimization - iGaming Supershow 2012Advanced WordPress Optimization - iGaming Supershow 2012
Advanced WordPress Optimization - iGaming Supershow 2012
 
Intro To Django
Intro To DjangoIntro To Django
Intro To Django
 
Responsive Web Design: the secret sauce - JavaScript Open Day Montreal - 2015...
Responsive Web Design: the secret sauce - JavaScript Open Day Montreal - 2015...Responsive Web Design: the secret sauce - JavaScript Open Day Montreal - 2015...
Responsive Web Design: the secret sauce - JavaScript Open Day Montreal - 2015...
 
UpdatedMuhammadBilalResume.docx (1)
UpdatedMuhammadBilalResume.docx (1)UpdatedMuhammadBilalResume.docx (1)
UpdatedMuhammadBilalResume.docx (1)
 
Design
DesignDesign
Design
 
Responsive Web Design, get the best out of your designs - JavaScript Open Day...
Responsive Web Design, get the best out of your designs - JavaScript Open Day...Responsive Web Design, get the best out of your designs - JavaScript Open Day...
Responsive Web Design, get the best out of your designs - JavaScript Open Day...
 
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and GulpOptimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
 
Makefiles in 2020 — Why they still matter
Makefiles in 2020 — Why they still matterMakefiles in 2020 — Why they still matter
Makefiles in 2020 — Why they still matter
 
LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경
LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경
LetSwift 2017 - 토스 iOS 앱의 개발/배포 환경
 
Don't sh** in the Pool
Don't sh** in the PoolDon't sh** in the Pool
Don't sh** in the Pool
 
Responsive Web Design, the secret sauce - MSDEVMTL - 2016-01-25
Responsive Web Design, the secret sauce - MSDEVMTL - 2016-01-25Responsive Web Design, the secret sauce - MSDEVMTL - 2016-01-25
Responsive Web Design, the secret sauce - MSDEVMTL - 2016-01-25
 
Build and Deploy a Python Web App to Amazon in 30 Mins
Build and Deploy a Python Web App to Amazon in 30 MinsBuild and Deploy a Python Web App to Amazon in 30 Mins
Build and Deploy a Python Web App to Amazon in 30 Mins
 
OOScss Architecture For Rails Apps
OOScss Architecture For Rails AppsOOScss Architecture For Rails Apps
OOScss Architecture For Rails Apps
 
WordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute WorkshopWordPress Plugin Development- Rich Media Institute Workshop
WordPress Plugin Development- Rich Media Institute Workshop
 

Recently uploaded

Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 

Recently uploaded (20)

Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 

Working with Android TV - English

  • 1. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Working with Android TV Pedro Vicente Gómez Sánchez Android Expert at Karumi pedro@karumi.com @pedro_g_s github.com/pedrovgs
  • 2. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
  • 3. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Are we going to develop always for smartphones?
  • 4. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs https://developer.android.com/tv/adt-1/index.html Nexus Player
  • 5. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
  • 6. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs ● Introduction. ● First steps. ● Thinking different. ● BrowseFragment. ● DetailsFragment. ● SearchFragment. ● Recommendations. ● Without Leanback library. Agenda
  • 7. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs ● Nexus Player supports API level 21 or higher. ● Leanback library is really useful. Almost essential. ● Easy to work with if you don’t want to do something different. ● Forget about touch your TV. Introduction
  • 8. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs First steps
  • 9. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Add Leanback library to your project: First steps
  • 10. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs First steps Configure an Activity to use “LEANBACK_LAUNCHER” intent filter:
  • 11. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Thinking different: Try to use your smartphone without touch it!
  • 12. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Try to avoid the keyboard: Thinking different
  • 13. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Thinking different All the user experience is going to be related to the focus usage.
  • 14. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs You have a microphone, use it. Thinking different
  • 15. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Use the background, it’s a powerful tool. Thinking different
  • 16. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Use content recommendations. Thinking different
  • 17. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Leanback Library
  • 18. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs BrowseFragment
  • 19. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs DetailFragment
  • 20. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs SearchFragment
  • 21. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs How can I use these Fragments?
  • 22. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs BrowseFragment Create your own Fragment and extend from Leanback BrowseFragment:
  • 23. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs BrowseFragment Configure your user interface to apply your application colors and icons:
  • 24. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs BrowseFragment Once you have loaded all the content, configure one ArrayObjectAdapter with your data:
  • 25. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs BrowseFragment Each row is going to be represented with one “ArrayObjectAdapter”, one “HeaderItem” and one “Presenter”:
  • 26. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs BrowseFragment Configure your listeners to change your user interface when one element is selected or clicked.
  • 27. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
  • 28. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs DetailsFragment Create your own Fragment and extend from Leanback DetailsFragment:
  • 29. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs DetailsFragment Configure DetailsFragment background to be updated when needed:
  • 30. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs DetailsFragment Show detailed information using the same approach we use with BrowseFragment based on ArrayObjectAdapter:
  • 31. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs DetailsFragment Add actions if needed:
  • 32. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
  • 33. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs SearchFragment Create your own Fragment and extend from Leanback SearchFragment:
  • 34. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs SearchFragment To be able to react to user clicks you have to configure a OnItemViewClickedListener instance:
  • 35. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs SearchFragment Override some methods to perform your search and indicate the adapter you are going to use to show search information. Your fragment has to implement Leanback SearchResultProvider interface.
  • 36. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
  • 37. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Android Presenters Android Presenters are the base of how your data is shown inside Leanback Fragments. You can use some widgets from Leanback library or create your own presenters.
  • 38. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
  • 39. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Recommendations Android gives you the opportunity to show content recommendations to your users. This mechanism is based on classic Android notifications.
  • 40. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
  • 41. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Without Leanback library
  • 42. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Without Leanback library One of the problems related to the Leanback usage is that all your applications are going to be really similar. If you want to do something different, you’ll have to use your imagination. Some interesting ideas: ● Use the focus and selectors to give more information to the user. ● State list animator is going to be your new best friend. ● Some elements will have to be focusables and disable the focus on runtime could be needed. ● Change your backgrounds with cool images to provide more context to the user.
  • 43. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Without Leanback library: Focus NextFocusX configuration is going to be really useful for your UI. RequestFocus xml label will provide you more flexibility. Remember to enable focusable in some of your views, default state is false in some views.
  • 44. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
  • 45. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Without Leanback library: State List Animators If you want to improve how your users know what’s the elemen it selected and you are not using a Leanback widget, you can use state list animators to animate your widgets when one get or lose the focus.
  • 46. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
  • 47. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Without Leanback library: Use focus programmatically Use “getCurrentFocus()” method to know which is the view with the focus and don’ t be afraid to change “focusable” attribute of your views to create a better user experience.
  • 48. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
  • 49. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Without Leanback library: Backgrounds To be able to provide more information to the user about the current context you can change the Activity/Fragment background.
  • 50. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
  • 51. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs
  • 52. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs https://www.github.com/pedrovgs/TuentiTV Show me the code!
  • 53. Pedro V. Gómez Sánchez - pedro@karumi.com - @pedro_g_s - github.com/pedrovgs Questions?