Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android TV Talk

Bcc14b45a86f42cd22d9102a96bc8a5c?s=47 Effie Barak
December 03, 2015

Android TV Talk


Effie Barak

December 03, 2015

More Decks by Effie Barak

Other Decks in Technology


  1. ANDROID TV APPLICATION Effie Barak (@CodingChick)

  2. None
  3. None
  4. Support libraries required Either Glide or Picasso can work, there

    are implementation differences
  5. 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 :(
  6. Application Manifest Changes

  7. Theme to play with

  8. Tons of auto generated code!

  9. Main page birdview

  10. Main page birdview scrolling

  11. Main Fragment that extends BrowseFragment: ArrayObjectAdapter ListRowPresenter ImageCardView

  12. Hooking up Udemy’s model

  13. Click events should use Course model

  14. CourseCardPresenter extends Presenter (Is just your everyday adapter)

  15. ImageCardView is provided by leanback • CARD_TYPE_INFO_OVER (1) • CARD_TYPE_INFO_UNDER

  16. Course Details birdview

  17. Course Details scrolled down

  18. CourseDetailsFragment DetailsOverviewRowPresenter ClassPresenterSelector ListRowPresenter ImageCardView

  19. DetailsOverviewRowPresenter is deprecated New class- FullWidthDetailsOverviewRowPresenter with different UI :(

  20. LecturePresenter is similar to CoursePresenter

  21. Details row gets its own Presenter

  22. Creating the course details row

  23. Creating the lectures row

  24. Hooking it all up to the ClassPresenterSelector

  25. Clicking on a lecture starts the Playback activity

  26. Playback Activity

  27. Playback Activity

  28. Playback Activity

  29. PlaybackOverlayFragment extends leanback’s PlaybackOverlayFragment ClassPresenterSelector DetailsOverviewRowPresenter ListRowPresenter

  30. Instantiating the base structure

  31. Adding all the ACTIONS Etc etc etc…

  32. Hooking up the actions listeners

  33. Video! Warp 9! Engage!

  34. The VideoView plays things

  35. Implementation of MediaSession

  36. And the callbacks class

  37. playPause method

  38. The controls in the PlaybackControlsRow need to know.

  39. The actions click events can invoke the MediaController’s methods

  40. Voice search

  41. Voice search

  42. Searchinggg

  43. In the Search Fragment

  44. The actual search

  45. Loading the results

  46. Handling clicking on a result

  47. Starting the whole thing up

  48. Useful resources: https://github.com/googlesamples/androidtv-Leanback Default auto- generated template https://developer.android.com/training/tv/index.html (Sorta, kinda,