Chapter    6

Android TV App Publishing

After you have built an application, you always want to do a final run-through to ensure that your app works as expected. With Android TV this is especially important, as each Android TV app is subject to approval before being available on the Google Play Store. In this chapter you will learn about the items that Google will look for when evaluating your app and some general tips for distributing your app to users.

Android TV App Checklist

It is important to note that the approval process isn’t for censorship, but rather to make sure your app layouts and controls work correctly for Android TV users. Before you attempt to upload your APK to the Play Store, you should validate that your app meets Google’s guidelines.

Support the Android TV OS

In order for users to access your application from the Android TV home screen, you will need to make sure that you provide an Android TV entry point into your app by declaring a CATEGORY_LEANBACK_LAUNCHER filter in an activity node of your manifest. If this is not available, then your application will not appear in either of the application rows on the home screen.

When you have declared an activity for Android TV, you will need to associate a banner icon with it that will be displayed in the application row. The launcher banner will need to be 320px by 180px and any text on the image will need to be localized for every language that your application supports.

If you are porting an application from strictly mobile to Android TV, then you will need to ensure that your manifest does not declare any required hardware that is not supported by the Android TV platform. This includes the camera, touchscreen, and various hardware sensors. If any of these items are declared as required, your app will not be discoverable by Android TV devices.

UI Design

In an episode of the Android Backstage podcast, former Android TV team engineer Tim Kilbourn mentioned an app that had been released for the Google TV platform without verifying that it worked as expected. Rather than displaying in a presentable fashion, the app was locked into portrait mode and stretched across the television. Experiences like this are why UI verification are an important part of the Android TV approval process. Needless to say, you should ensure that your app provides layout resources that work in landscape orientation.

Because most users will experience their television from an average of ten feet away, you will need to ensure that all text and controls are large enough to be visible, and all bitmaps and icons are high resolution. Due to some unique conditions of TV, you will also need to make sure your layouts handle overscan and your application’s color scheme works well. These topics were discussed in Chapter 2 in greater detail.

If your application uses advertisements, it is recommended that you use video ads that are full-screen and dismissible within 30 seconds. It is important to note that advertisements that rely on sending an intent to a web page should not be used, as Android TV does not come with a built-in web browser. If you do launch an intent for a web page, your application will crash if the users have not installed their own web browsers.

You must also make sure your app responds correctly to the D-pad or game controller so that your users can navigate through your application. This is handled by the classes in the Leanback Support library, but you will need to make sure your own custom classes also respond accordingly.

Searching and Discovery

While having an application that plays content is one thing, you can take it to an entirely new level by helping users discover content or by providing recommendations. These items were covered in depth in Chapter 4. In short, you should make sure global search and recommendations are working for your applications, and users should be taken directly to the content when they find something that they are interested in.

Games

In the last chapter you were introduced to some key points for Android TV game development. When you create a game for Android TV, you will need to declare it as a game in the manifest for it to show up in the games row on the home screen.

Your manifest should also be updated if you support the use of the game controller in your application. If you do support the use of a game controller, you will need to make sure that your app has buttons contingencies for the use of the Start, Select, and Menu buttons, as not all controls include these. You will want to provide a generic gamepad controller graphic to inform your users how the controls will affect your game. You will need to ensure that your application provides controls for easily exiting your application so that the users can return to the home screen.

While networking is not a new concept for Android, the Android TV is one of the first devices that can support an Ethernet connection. As such, you will want to ensure that any networking code you have verifies that the device is connected to a network through either WiFi or an Ethernet cable.

Distributing Your Application

Once you have your app completed and you have looked over your project to make sure everything looks great, you will need to make it available for users to download. You have two major outlets here, the Google Play Store and the Amazon App Store. It is important to note that both stores have a similar approval process before your app will be accessible for users.

Google Play Store Distribution

As with most things involving the Android TV, the app publishing process with Google is fairly similar to working with a standard phone or tablet app. You will need to create an APK and sign it with a release certification, and then upload it to the Google Play Developer Console. However, when you start filling out the store listing information, you will need to go into the Android TV section and provide assets that can be used by the Play Store, as seen in Figure 6-1.

9781484217832_Fig06-01.jpg

Figure 6-1. Android TV Google Play Store listing assets

Aside from having to provide assets, the Play Store will automatically know if you are publishing an Android TV application because of the declaration of a Leanback Launcher in your manifest file.

Amazon Fire TV Distribution

As of Fire OS 5, you are able to distribute Android apps made with the Leanback Support library and Lollipop features over the Amazon App Store for Fire TVs. While making your application compatible with the Amazon Fire OS is beyond the scope of this book, you can find detailed documentation on developer.amazon.com that goes over installing and setting up the Amazon SDK Platform tools, and how to use Amazon’s specific SDK and tools in your application. This will allow you to distribute your app to an even larger group of users without much modification.

Summary

In this chapter you reviewed design and experience guidelines that have been discussed throughout this book. You have also learned about some of the ways you can distribute your application for television users. This book covered creating an application from the ground up for displaying content and helping your users enjoy media, as well as some tools that should help you with game development for Android TV. As you continue to learn about Android TV development, you should go through Google’s developer documentation, watch the Google Developer videos online, and experiment with your app to find out what works best for you and your users. Good luck, and have fun!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.57.251