Top tips for Android TV app development
Our top tips for developing Android (& Amazon Fire) TV apps.
The challenge
Recently we partnered with Fruitmedia, a talented video production company, to develop a TV app for them. TV apps are becoming increasingly popular and important as we explored in our recent article Why build a TV app?
Fruitmedia’s challenge was to produce an effective showcase for some of their most innovative videos.
Upon hearing and discussing the brief we split off into our Android and Apple teams and got started.
For Android we wanted to ensure that we created an app that not only looked great but felt immediately ‘at home’ alongside the small pool of existing TV apps.
This was quite a challenge as we had two platforms to deal with: Android TV and Amazon Fire TV.
From what we’ve learned so far, and from this project, here are our ‘top tips’ for Android TV app development:
TV top tip #1
We had some trouble getting started on Amazon Fire TV as the devices we had to hand were first generation devices running an older version of Fire OS. Recently Amazon have stated that all their devices will get an update to the latest Fire OS so we decided to just concentrate on that.
So, without further ado, we popped to the shop to grab a device on the latest Fire OS and we were good to go.
Tip #1 You will either want a newer device running the latest OS, or you will need to install the developer preview.
This might seem obvious but as we’re dabbling with very new technology in an emerging, fast-paced context it’s easier to get unwittingly left behind if you don’t do your homework.
TV top tip #2
One of the first things we did was to download Google’s sample project — a great decision.
This sample project gave us great insight into which classes we wanted to use to achieve the desired layouts and how to utilise some of the best features.
Android’s Leanback library is very good at ensuring that you build a TV friendly experience without having to write lots of boiler plate code, so make sure you take advantage of that.
Tip #2 Download the sample code and utilise the leanback library.
https://github.com/googlesamples/androidtv-Leanback
http://developer.android.com/tools/support-library/features.html#v17-leanback
TV top tip #3
Perhaps our biggest challenge (and obviously the most crucial) was to actually get a video to stream. A TV app without the ability to stream video has somewhat limited potential.
Unsurprisingly this was mainly down to video formats.
Tip #3 Make sure you check which formats the platform supports fully and be sure to use those.
http://developer.android.com/guide/appendix/media-formats.html
TV top tip #4
For design, because we didn’t have an enormous catalogue of videos that we wanted to showcase, we went with a simple VerticalGridFragment with only one row displaying across the bottom of the screen.
We achieved this by setting the number of columns to the number of videos. There isn’t a set rows option.
We also ensured that our code was dynamic enough that it would be easier to cater for more content in the future, probably by utilising a sidebar menu.
We hosted our videos on Amazon S3 Storage and used Amazon Cloud Front as our go-between.
A JSON file stored all our meta data and video URLs meaning we could update our content without having to update the app.
Tip #4 Make your design is appropriate for your content and don’t be afraid to use standard layouts.
In summary
All things considered, creating TV apps is a different and exciting challenge.
With the release of Apple TV the TV market is looking to take off and we’re thrilled to be at the forefront of TV app development.
A reminder of some of the key links we’ve referenced in this article:
https://github.com/googlesamples/androidtv-Leanback
http://developer.android.com/tools/support-library/features.html#v17-leanback
http://developer.android.com/guide/appendix/media-formats.html
Originally published at www.brightec.co.uk.