Android TV application hands on tutorial

This tutorial course is to learn Android TV application development, especially focusing on Leanback support library. Leanback support library is introduced to helps implementing UI design layout easily. It is useful for Media contents (photo/video etc) – based Android TV application development.
The source code of this project is uploaded on github. My study is mainly based on following reference.
- Android Developer site – Building Apps for TV
- Android TV sample application on github
- Building applications for Android TV
Introduction – Android TV application hands on Tutorial 1
- 1 Android TV application development introduction
- 2 Launch new Android TV application
- 2.1 Launch Android studio,
- 2.2 Add activity
- 2.3 Add fragment
- 2.4 Adding setupUIElements() to MainFragment.java
- 2.5 Modify Android Manifest.
Construction of BrowseFragment – Android TV app Tutorial 2
- 1 Construction of BrowseFragment
- 2 Presenter class
- 3 Implement HeadersFragment & RowsFragment (GridItemPresenter)
How to use Presenter and ViewHolder? – Android TV app Tutorial 3
- 1 Aim of this chapter
- 2 ImageCardView
- 3 Implement CardPresenter, Movie class
- 4 Build and Run 1
- 5 Updating main image after downloading picture from web using Picasso
- 6 Build and Run 2
- 7 Customizing ImageCardView, BaseCardView
- 7.1 setCardType(int type)
- 7.2 setInfoVisibility(int visibility), setExtraVisibility(int visibility)
PicassoBackgroundManager – Android TV app Tutorial 4
- 1 Aim of this chapter
- 2 setOnItemViewSelectedListener listener & onItemSelected callback
- 3 SimpleBackgroundManager
DetailsOverviewRowPresenter & FullWidthDetailsOverviewRowPresenter – Android TV app Tutorial 5
- 1 Aim of this chapter – DetailsActivity implementation
- 2 Implementing click listener in MainFragment
- 3 DetailsActivity & VideoDetailsFragment – Explanation
- 4 DetailsActivity & VideoDetailsFragment – Implementation
- 4.1 DetailsActivity
- 4.2 VideoDetailsFragment
ErrorFragment – Android TV app Tutorial 6
- 1 ErrorActivity & ErrorFragment
- 1.1 ErrorActivity
- 1.2 ErrorFragment
- 1.3 Modify AndroidManifest.xml to declare ErrorActivity,
PlaybackOverlayActivity & PlaybackOverlayFragment – Android TV app Tutorial 7
- 1 PlaybackOverlayActivity & PlaybackOverlayFragment – Theory
- 2 PlaybackOverlayActivity & PlaybackOverlayFragment – Implementation
- 2.1 PlaybackOverlayActivity
- 2.2 PlaybackOverlayFragment
Video Controls minimum implementaion – Android TV app Tutorial 8
- 1 Video Controls minimum implementaion
- 2 VideoView handling
- 3 Implement setOnActionClickedListener & onActionClicked callback
- 4 PlayPauseAction
- 5 Rewind & FastForward
- 6 SkipPrevious & SkipNext
- 7 ThumbUp & ThumbDown & Repeat & Shuffle & HighQuality & ClosedCaptioning & MoreActions
- 8 Build & Run
MediaSession & MediaController – Android TV app Tutorial 9
- 1 Video Controls implementation with MediaSession
- 2 Implement requestVisibleBehind
- 3 Class structure of this chapter
- 4 Create & release MediaSession
- 5 Video control functions
- 6 Video control by remote controller key
- 7 Video control from UI – MediaController.getTransportControls
- 8 Updating UI of VideoDetailsFragment
- 9 Updating video control icons in onPlaybackStateChanged
- 9.1 Update PlaybackState
- 9.2 Callback
- 10.1 Update MediaMetadata
- 10.2 Callback
GuidedStepFragment – Android TV app tutorial 10
- 1 GuidedStepFragment to show Settings display
- 2 Create GuidedStepActivity & Implement onItemClicked in MainFragment
- 3 GuidedStepFragment – Structure
- 4 Overriding Method
- 9.1 GuidedStepFragment – Stylist
Recommendation card – Android TV app Tutorial 11
- 1 Recommendation
- 2 What is implemented in this chapter?
- 3 RecommendationBuilder
- 4 RecommendationFactory
- 5 Build & run
- 6 Running recommendation as service
SearchFragment – Android TV app Tutorial 12
- 1 In-app Search on Android TV application
- 2 In-app Search icon on BrowseFragment
- 3 SearchFragment
- 4 Implement voice input/voice search – setSpeechRecognitionCallback
- 5 Overriding onSearchRequeseted to activate in-app search
- 6 Customize in-app search – SearchResultProvider
- 7 Build and run
In-app Search function implementation – Android TV app Tutorial 13
- 1 Search function implementation
- 1.1 In-app search algorithm
- 1.2 Execute search
- 1.3 Dynamic search execution
Refactoring source code construction – Android TV app Tutorial 14
- 1 Refactoring
- 1.1 UI handling modules
- 1.2 Model-View-Presenter (MVP) architectural pattern
Spinner Fragment: show loading progress bar – Android TV app Tutorial Appendix A
- 1 Spinner Fragment – show loading progress bar
- 2 Usage of Spinner Fragment – AsyncTask
- 2.1 Put button in MainFragment
- 2.2 AsyncTask implementation
- 2.3 Build and run
Background data loading – Android TV application hands on tutorial 15
- 1 Background data loading using Loader class
- 2 Relationship between Activity, Loader and LoaderManager
- 3 Hands on example: Minimum implementation
- 3.1 Activity/Fragment side
- 3.2 Loader side
- 3.3 Go back to Loader side
Data loading from web – Android TV application hands on tutorial 16
- 1 Manage data online, keep updated.
- 2 Video data preparation
- 3 Video data list in JSON format
- 4 Data loading trigger – VideoItemLoader
- 5 Data loading process – VideoItemProvider
- 6 AndroidManifest
- 7 Build and run!
- 8 Best data management architecture across application?
BrowseFragment Header customization – Android TV application hands on tutorial 17
- 1 More customization of BrowseFragment – Showing icon beside the Header title
- 2 How to customize header design
- 3 Making own Model
- 4 Making own View
- 5 Making own RowHeaderPresenter
- 6 Implementation in MainFragment
- 7 Build and run
BrowseFragment ListRow customization – Android TV application hands on tutorial 18
- 1 More customization of BrowseFragment – Multiple rows icon alignment on ListRow
- 2 Explanation: Dig in source code
- 3 Making CustomListRow
- 4 Making CustomListRowPresenter
- 5 Shadow customization
- 6 Modification in MainFragment
- 7 Build and run
- 8 Comment – ListRowHoverCardView