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
260
Images 101 - NYC
codingchick
0
210
Images 101
codingchick
1
310
Other Decks in Technology
See All in Technology
CustomCopを使ってMongoidのコーディングルールを整えてみた
jinoketani
0
220
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
540
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
180
LINEスキマニにおけるフロントエンド開発
lycorptech_jp
PRO
0
330
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
150
ガバメントクラウドのセキュリティ対策事例について
fujisawaryohei
0
530
Postman と API セキュリティ / Postman and API Security
yokawasa
0
200
サーバレスアプリ開発者向けアップデートをキャッチアップしてきた #AWSreInvent #regrowth_fuk
drumnistnakano
0
190
小学3年生夏休みの自由研究「夏休みに Copilot で遊んでみた」
taichinakamura
0
150
バクラクのドキュメント解析技術と実データにおける課題 / layerx-ccc-winter-2024
shimacos
2
1k
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
1
110
DevOps視点でAWS re:invent2024の新サービス・アプデを振り返ってみた
oshanqq
0
180
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Embracing the Ebb and Flow
colly
84
4.5k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Building an army of robots
kneath
302
44k
Being A Developer After 40
akosma
87
590k
A Philosophy of Restraint
colly
203
16k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Writing Fast Ruby
sferik
628
61k
A better future with KSS
kneath
238
17k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
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)