Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Android TV Talk
Search
Effie Barak
December 03, 2015
Technology
1
360
Android TV Talk
Effie Barak
December 03, 2015
Tweet
Share
More Decks by Effie Barak
See All by Effie Barak
Working with AOSP- Droidcon NY 2022
codingchick
0
220
A talk about Talks- AndroidMarkerFR
codingchick
0
210
Inside The Room- DCBln21 revised edition
codingchick
0
280
A talk about Talks - the extended version
codingchick
0
150
A talk about Talks
codingchick
0
90
Inside the room- DC SF edition
codingchick
0
170
Inside the room
codingchick
2
250
Images 101 - NYC
codingchick
0
200
Images 101
codingchick
1
300
Other Decks in Technology
See All in Technology
サイバーエージェントにおける生成AIのリスキリング施策の取り組み / cyber-ai-reskilling
cyberagentdevelopers
PRO
2
200
Vueで Webコンポーネントを作って Reactで使う / 20241030-cloudsign-vuefes_after_night
bengo4com
4
2.5k
事業者間調整の行間を読む 調整の具体事例
sugiim
0
1.5k
Apple/Google/Amazonの決済システムの違いを踏まえた定期購読課金システムの構築 / abema-billing-system
cyberagentdevelopers
PRO
1
220
来年もre:Invent2024 に行きたいあなたへ - “集中”と“つながり”で楽しむ -
ny7760
0
470
新卒1年目が挑む!生成AI × マルチエージェントで実現する次世代オンボーディング / operation-ai-onboarding
cyberagentdevelopers
PRO
1
170
IaC運用を楽にするためにCDK Pipelinesを導入したけど、思い通りにいかなかった話
smt7174
1
110
急成長中のWINTICKETにおける品質と開発スピードと向き合ったQA戦略と今後の展望 / winticket-autify
cyberagentdevelopers
PRO
1
160
Aurora_BlueGreenDeploymentsやってみた
tsukasa_ishimaru
1
130
AWS CDKでデータリストアの運用、どのように設計する?~Aurora・EFSの実践事例を紹介~/aws-cdk-data-restore-aurora-efs
mhrtech
4
650
Java x Spring Boot Warm up
kazu_kichi_67
2
490
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
27
12k
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
65
4.4k
Automating Front-end Workflow
addyosmani
1365
200k
Building Adaptive Systems
keathley
38
2.2k
Art, The Web, and Tiny UX
lynnandtonic
296
20k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Designing for humans not robots
tammielis
249
25k
Code Review Best Practice
trishagee
64
17k
Rails Girls Zürich Keynote
gr2m
93
13k
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
The Cost Of JavaScript in 2023
addyosmani
45
6.6k
How GitHub (no longer) Works
holman
311
140k
Why Our Code Smells
bkeepers
PRO
334
57k
Transcript
ANDROID TV APPLICATION Effie Barak (@CodingChick)
None
None
Support libraries required Either Glide or Picasso can work, there
are implementation differences
Which version of the support libraries to use? The latest
one that works - All support libraries versions need to be the same. - SQLCipher needs to be 3.3.1-1or higher. Which didn’t work so well for me :(
Application Manifest Changes
Theme to play with
Tons of auto generated code!
Main page birdview
Main page birdview scrolling
Main Fragment that extends BrowseFragment: ArrayObjectAdapter ListRowPresenter ImageCardView
Hooking up Udemy’s model
Click events should use Course model
CourseCardPresenter extends Presenter (Is just your everyday adapter)
ImageCardView is provided by leanback • CARD_TYPE_INFO_OVER (1) • CARD_TYPE_INFO_UNDER
(2) • CARD_TYPE_INFO_UNDER_WITH_EXTRA (3) • CARD_TYPE_MAIN_ONLY (0)
Course Details birdview
Course Details scrolled down
CourseDetailsFragment DetailsOverviewRowPresenter ClassPresenterSelector ListRowPresenter ImageCardView
DetailsOverviewRowPresenter is deprecated New class- FullWidthDetailsOverviewRowPresenter with different UI :(
LecturePresenter is similar to CoursePresenter
Details row gets its own Presenter
Creating the course details row
Creating the lectures row
Hooking it all up to the ClassPresenterSelector
Clicking on a lecture starts the Playback activity
Playback Activity
Playback Activity
Playback Activity
PlaybackOverlayFragment extends leanback’s PlaybackOverlayFragment ClassPresenterSelector DetailsOverviewRowPresenter ListRowPresenter
Instantiating the base structure
Adding all the ACTIONS Etc etc etc…
Hooking up the actions listeners
Video! Warp 9! Engage!
The VideoView plays things
Implementation of MediaSession
And the callbacks class
playPause method
The controls in the PlaybackControlsRow need to know.
The actions click events can invoke the MediaController’s methods
Voice search
Voice search
Searchinggg
In the Search Fragment
The actual search
Loading the results
Handling clicking on a result
Starting the whole thing up
Useful resources: https://github.com/googlesamples/androidtv-Leanback Default auto- generated template https://developer.android.com/training/tv/index.html (Sorta, kinda,
maybe)