This is a sample project that supports the Android TV OS app. It uses the BLoC architecture pattern, along with Dio for network management and Drift for database handling.
Important
NOTE: EXAMPLE FOR ANDROID ONLY.
Important
A detailed step-by-step guide is available on Medium!
👉 Android TV Application (Setup for Jetpack Compose and Flutter) 👈
Important
A similar project for pure Native Android (Kotlin) is also available!
👉 SampleAndroidTvApp 👈
- Android TV OS: A version of Android designed for smart TVs, providing an optimized interface for streaming and apps.
- Bloc Patterns: Separates business logic, data access, and UI using streams to handle state. (Documentation)
- Dio Network Manager: Responsible for making requests and retrieving data from remote servers.
- Drift Database (SQL): Handles local data persistence, querying, and offline functionality. (Documentation)
- Cached Network Image: Package for loading images with offline caching support.
To support Android TV, update your AndroidManifest.xml with the following:
<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 (Kotlin Language) 👉 SampleAndroidTvApp 👈
- Flutter SDK: 3.41.6
- Dart Version: 3.11.4
- SpaceX-API (GitHub): r-spacex/SpaceX-API
- Postman Documentation: SpaceX Data API
- TV App Guide: TV App using Flutter - Mobikul
- UI Layouts: Stack, Vertical, and Horizontal ListView in Flutter
If you find this project useful, please give it a star! Check out the stargazers here
This project is maintained for the community. Feedback, bug reports, and feature requests are welcome! Feel free to open an issue or submit a pull request.
