A responsive Android sample app written in Kotlin and Jetpack Compose, supporting different navigation layout on screen sizes. The video player is currently Jetpack Media 3.
The events under the Events tab provides video playback. The schedule under the Schedule tab refreshes automatically every 30 seconds. For both tabs, you can always do swipe-to-refresh, or tap the navigation icon to scroll to the top of the list.
This was a code test assignment as a part of the interview process. The task covered common RESTApi, SQLite, RecyclerView, Constraint Layout, MVVM, plus dependency injection and testings.
Although the title carries "Android TV", it has nothing to do with that - this is an Android mobile App as required by the specifications.
The interview process was concluded in October, 2021, but I am still keep on improving the codes for demonstration purpose.
The original XML View version is no longer maintained, you can access to the XML branch here.
Please note that the APIs are supplied by DAZN in 2021 for recruitment purpose. They may not work at any time.
_
Planned enhancements are now logged as issues.
- Kotlin
- MVVM & clean architecture
- Jetpack Compose - Single Activity
- Kotlin Coroutines and Flow
- Dependency Injection using Dagger Hilt
- Material 3
- Dynamic screen layout support using Windows Size Class
- Jetpack Media 3 video player
- Gradle Kotlin DSL and Version Catalog
- Baseline Profile
- Full unit test and UI (Journey) test suite
- Jetpack Compose - Modern toolkit for building native UI
- Jetpack Navigation for Compose - Navigation library for Jetpack Compose applications
- Jetpack Lifecycle - Lifecycle-aware components, including ViewModel support for Jetpack Compose
- Kotlin Coroutines - Asynchronous programming with coroutines
- Kotlin Flow - Reactive streams for Kotlin
- Jetpack Room - Database library for local data cache
- Retrofit2 - HTTP client for Android and Java
- Moshi - Modern JSON library for Android and Java
- Splash Screen API - Official splash screen solution
- Coil - Image loading library for Android, leveraging Kotlin Coroutines
- media3-exoplayer - Video Player
- Dagger Hilt - Dependency injection framework
- Timber - Logging utility
- LeakCanary - Memory leak detection tool
- JUnit 4 - Testing framework and runner
- Espresso - UI testing framework for Android
- UI Automator - UI testing framework for user interaction automation
- Robolectric - Testing framework for Android-JVM tests
- kotest - We use the assertion library only, not the runner
- MockK - Mocking library for Kotlin
- Ktlint Gradle - Plugin for linting and formatting Kotlin code
- Kover - Kotlin code coverage tool
- Github Action - CI/CD
- codecov - code coverage
If you want to try out the app without building it, check out the Releases section where you can find the APK and App Bundles for each major version.
- Android Studio Iguana | 2023.2.1
- Android device or simulator running Android 9.0+ (API 28)
Release builds will be signed if either the keystore file or environment variables are set. Otherwise, the app will be built unsigned.
-
Android Keystore is not being stored in this repository. You need your own Keystore to generate the apk / App Bundle
-
If your project folder is at
/app/dazn-code-challenge/
, the Keystore file andkeystore.properties
should be placed at/app/
-
The format of
keystore.properties
is:store=/app/release-key.keystore alias=<alias> pass=<alias password> storePass=<keystore password>
-
This project has been configured to support automated CI builds.
-
The following environment variables have been set to provide the keystore:
CI = true HOME = <the home directory of the bitrise environment> CI_ANDROID_KEYSTORE_PASSWORD = <your keystore password> CI_ANDROID_KEYSTORE_ALIAS = <your keystore alias> CI_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD = <your keystore private key password>
This app has two build variants: Debug
and Release
. The most common build commands are:
./gradlew clean installDebug
./gradlew clean instal
./gradlew clean bundleRelease
./gradlew clean assembleRelease
The generated apk(s) will be stored under app/build/outputs/
Debug builds will have an App package name suffix .debug