The aim of this app is to replicate the high level functionality of www.tvmaze.com and showcase an android app out of it. It connects with TVDB API to give you popular shows and let you mark anyone as favorite. TvFlix consists of 3 pieces of UI right now:
- Home with Popular Shows
- Favorites
- All Shows
This app is under development. 👷 🛠️
Note: TvFlix is an unofficial app built only for learning and sharing the latest concepts with #AndroidDevs
- The entire codebase is in Kotlin
- Uses Kotlin Coroutines.
- Uses MVVM Architecture by Architecture Components. Room, ViewModel, Paging
- Uses Hilt Android with Dagger for dependency injection
- Unit Testing by Mockito
- Tests Coroutines and architecture components like ViewModel
- UI Test by Espresso based on Robot Pattern
- Uses Kotlin Coroutines Test to unit test Kotlin Coroutines
- Uses StateFlow as a replacement over LiveData as a state-holder observable
- Uses Firebase Remote Config for experimentation and feature rollout
- Uses Firebase App Distribution for internal distribution and quality testing
There are several articles written on this repository which state the design and architecture.
The TvFlix complete repository has been re-written in Kotlin with Coroutines covering Unit Tests across ViewModels and UI tests for the app. Know more: Kotlin Everywhere. Coroutines, Tests, Robots and much more…
The codebase tries to follow Uncle Bob Clean Code Architecture with SOLID principles. Know more: Migration from MVP to MVVM using Android Architecture Components
The Shows screen displays the list of shows fetched from TvMaze API using Paging3 of Android Architecture Components. It also handles the retry if any network error occurred. Recently the repository has been migrated to use Paging3.
Paging3 is in heavy development, and if you want to catch up with stable library(Paging 2), then check out this blog
Pagination using Paging Library with RxJava and Dagger
The Favourites screen displays the list of shows marked favourites from the Home screen. The user can add/remove from
the favorites as and when required. The implementation of the favorites is done using Room
Persistence Library with RxJava and Dagger.
Know more:
Room with RxJava and Dagger
TvFlix has Static Code Analysis tools like FindBugs, PMD and Checkstyle integrated. These tools help in finding potential bugs that would have been missed and help in making the codebase clean. Know more: Static Code Analysis for Android Using FindBugs, PMD and CheckStyle
If you have found an issue in this sample, please file it. Better yet, if you want to contribute to the repository, go ahead, any kind of patches are encouraged, and may be submitted by forking this project and submitting a pull request. If you have something big in mind, or any architectural change, please raise an issue first to discuss it.
Copyright (c) 2020 Ashwini Kumar
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.