Android TV Application (Setup for Jetpack Compose and Flutter)

Nicos Nicolaou
2 min readNov 21, 2023

--

For this article we will see the setup for an Android TV Application with Android Jetpack Compose and Flutter, tested on Android.

First of all, add the follow code in the Manifest (Common setup for Native and Flutter).

<manifest>

<!--Android TV Application Setup-->
<uses-feature android:name="android.software.leanback" android:required="false" />

<!--Android TV Application Setup-->
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />

<!--Android TV Application Setup-->
<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" />
<!--Android TV Application Setup-->
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
<!--other code here-->
</application>
</manifest>

Additional setup only for Native Android application (Jetpack Compose)

Add the follow dependencies in the Gradle file.

val tvComposeFoundationVersion by extra("1.0.0-alpha11")
val tvComposeVersion by extra("1.0.0")

dependencies {
implementation("androidx.tv:tv-foundation:$tvComposeFoundationVersion")
implementation("androidx.tv:tv-material:$tvComposeVersion")
}

Check my sample projects with Compose and Flutter in my GitHub account to the follow links:

I hope you find the article and sample projects useful. Let me know your opinion under the comments. I will appreciate it if you let a clap, so, if I have your support to continue writing.

References:

--

--

Nicos Nicolaou

Senior Software Engineer, Android and Flutter Developer, Google Play Developer, Building libraries, Writing articles. 👇🔗 https://github.com/NicosNicolaou16