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
370
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
230
A talk about Talks- AndroidMarkerFR
codingchick
0
210
Inside The Room- DCBln21 revised edition
codingchick
0
290
A talk about Talks - the extended version
codingchick
0
160
A talk about Talks
codingchick
0
91
Inside the room- DC SF edition
codingchick
0
180
Inside the room
codingchick
2
270
Images 101 - NYC
codingchick
0
210
Images 101
codingchick
1
320
Other Decks in Technology
See All in Technology
2024年にチャレンジしたことを振り返るぞ
mitchan
0
140
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
110
複雑性の高いオブジェクト編集に向き合う: プラガブルなReactフォーム設計
righttouch
PRO
0
120
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
1
420
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.8k
Amazon Kendra GenAI Index 登場でどう変わる? 評価から学ぶ最適なRAG構成
naoki_0531
0
120
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
KubeCon NA 2024 Recap / Running WebAssembly (Wasm) Workloads Side-by-Side with Container Workloads
z63d
1
250
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
140
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
560
GitHub Copilot のテクニック集/GitHub Copilot Techniques
rayuron
37
15k
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Faster Mobile Websites
deanohume
305
30k
Done Done
chrislema
181
16k
Visualization
eitanlees
146
15k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Code Review Best Practice
trishagee
65
17k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Building an army of robots
kneath
302
44k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
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)