The project is a test implementation that uses Jetpack Compose for an Android TV OS app. It includes API requests to fetch a dynamic list, integrates Hilt for Dependency Injection, and utilizes Room Database for local data storage.
Android TV OShttps://developer.android.com/tv is a version of Android designed for smart TVs,
providing an optimized interface for streaming and apps.
The programming language is the Kotlin, it is a
modern, JVM-based programming language that is concise, safe, and interoperable with Java.
Kotlin Coroutines is used for asynchronous
tasks.
Kotlin KTX is a collection of Kotlin extensions that
offer more concise and expressive code for working with Android APIs and libraries.
The UI is build using Jetpack Compose.
Retrofit is responsible for making requests and retrieving
data from the remote server. (Repository)
Hilt Dependencies Injection
is an Android library that simplifies dependency injection by using annotations to automatically
manage and provide dependencies across components, built on top of
Dagger. (Documentation)
Room Database is responsible for saving
the retrieved data from the remote server, querying data from the local database, and supporting
offline functionality.
MVVM with repository is an
architecture where the Repository manages data sources (e.g., network, database), the ViewModel
processes the data for the UI, and the View displays the UI, ensuring a clear separation of
concerns.
KSP ("Kotlin Symbol Processing") is a tool for
efficient annotation processing in Kotlin, providing faster code generation and symbol manipulation
compared to KAPT. Repository
R8 enabled, is a code shrinker and obfuscator for
Android that optimizes and reduces the size of APKs by removing unused code and resources, while
also obfuscating the remaining code to improve security.
<manifest>
<uses-feature android:name="android.software.leanback" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<application android:banner="@mipmap/ic_launcher">
<!--other code here-->
<activity>
<!--other code here-->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
<!--other code here-->
</application>
</manifest>
Important
Check my article for the setup 👉 Android TV Application (Setup for Jetpack Compose and Flutter)- Medium 👈
Important
Similar project with (Dart Language) 👉 SampleFlutterTVApp 👈
#Versioning
Target SDK version: 35
Minimum SDK version: 28
Kotlin version: 2.1.0
Gradle version: 8.7.3
https://github.com/r-spacex/SpaceX-API (GitHub)
https://docs.spacexdata.com/?version=latest (Postman)
https://developer.android.com/training/tv/playback/compose
https://developer.android.com/jetpack/compose/touch-input/focus/react-to-focus
https://stackoverflow.com/questions/76281554/android-jetpack-compose-tv-focus-restoring