Introduction
Recently, a client requested a prototype for an Android TV Launcher app. Given the requirements that they might want to expand into mobile, I decided to give Flutter a chance at developing a TV app.
I wrote my opinion on LinkedIn and it caught quite a bit of attention:
My background in TV app development includes three Android TV apps: two enterprise-level applications built with XMLs (one for a big telecom provider and a white-labeled TV app for hotels called Smartell) and a smaller TV app developed using Jetpack Compose.
In this article, I’ll try to share my experience and opinion on why Flutter is better for TV development than native Android, regardless of whether you are using Jetpack Compose or XML.
Lack of technical debt
One of the most significant advantages of Flutter over native Android development is the lack of technical debt.
Whether you're using Jetpack Compose or XML layouts, the technical debt in native Android development is glaringly apparent and destroys the developer experience. Google learned from its mistakes and designed Flutter without the same problems.
Here are some examples of the common problems you have to deal with as an Android developer:
- Back button handling
- Permission handling
- Compose:
- Compose navigation, especially passing parameters
- Preview doesn’t work with ViewModels and requires mocking data
- Passing click handlers and properties to deeply nested Composables
- Performance impact
- Managing multiple Activities
- Services are a mess
- Notifications are a mess
- Random Gradle errors and Kotlin version misalignment
This is not to say Flutter doesn’t inherit some of these problems, it does, but the packages provided by the community and the design of the technology makes this way easier.
This alone speeds up the developer's productivity by a very large amount.
Cross-Platform Potential
When you are choosing a tech stack, it’s important to take into consideration how you are going to scale. Generally speaking, you can scale horizontally and vertically.
On the backend, vertically means a more powerful machine, and horizontally means more instances.
In mobile and TV, vertically means more users on the single platform, and horizontally means more users on the adjacent platforms. Moreover, it’s often the case that you must ensure a multi-platform experience from the start, and this is where Flutter shines.
You can expand your TV app to mobile, desktop, and web, but most importantly, to other TV platforms.
Nowadays, you can build a TV with Flutter for the following platforms (besides Android TV):
- Apple TV with a custom Flutter engine by Sasha Denisov
- Samsung Tizen with officialy supported Flutter-Tizen
- LG webOS with the official support
The only unsupported platform remains Roku, but I think that will be easily solvable in the future.
Backend-as-a-Service support
If you are a startup, moving fast is of utmost importance, so creating a backend from scratch is rarely an option.
Flutter plays well with modern backend solutions like Firebase, Supabase, AWS Amplify, Appwrite, and PocketBase. This gives you a variety of options to choose from whether you are an indie developer, startup, established company, agency, or enterprise.
In contrast, official support for Android is available only for Firebase, AWS Amplify, and Appwrite. Supabase has community made Kotlin SDK.
A hidden problem here is that Firebase and Amplify are Java libraries with Kotlin support, which means that they don’t give the full power of Kotlin as a language and you are left writing your own workaround to fit your architecture or use community packages, which might get abandoned.
Conclusion
Based on my extensive experience with both native Android TV app development and Flutter, I can confidently say that Flutter is the superior choice for most TV app projects. The increased development speed, reduced technical debt, and cross-platform capabilities make it an excellent investment for businesses looking to create high-quality, maintainable TV applications.
While native development still has its place, especially for highly platform-specific features, Flutter's advantages in terms of developer productivity and code maintainability cannot be overstated. As the Flutter ecosystem continues to grow and mature, it's poised to become the go-to solution for TV app development across all major platforms.
If you're starting a new TV app project or considering a rewrite of an existing application, I strongly recommend giving Flutter a serious look. The benefits in terms of development speed, code quality, and future-proofing your application are well worth the initial learning curve.
If you have found this useful, make sure to like and follow for more content like this. To know when the new articles are coming out, follow me on Twitter or LinkedIn.
Top comments (0)