rekire
rekire

Reputation: 47985

Implement and design Android apps for TV

I want to create a TV ready app. Since this is still a quiet new topic I'm asking myself those questions:

Also, I have problems currently to find helpful resources on the web especially for the Amazon Fire TV. I found many resources which were outdated or have moved and are now death links.

Are there some best practices to implement great apps?

Upvotes: 4

Views: 2274

Answers (3)

Luca Interwick
Luca Interwick

Reputation: 41

Before getting deep into build, you should try out the app idea as a protoype and test out this TV experience.

You don't need to purchase a device before creating your app, you can start building it as a website in HTML/JS to hammer out your idea and for quick tweaking of the look and feel.

Options to test the "10 foot" TV experience

  1. Connect your computer directly to your TV input such as HDMI.

  2. If you have a Smart TV with a web browser, load the test site in the browser. This does become pain for refreshing changes.

  3. If you want to go a step farther with interactivity, try http://www.jumpwick.com with option one or two.

    • It will let you test controlling your app on the tv using your phone
    • All browser based
    • (Full disclosure I work on the product http://www.jumpwick.com, and you can certainly create your app without the product, using options 1 or 2).

Upvotes: 0

Sebastiano
Sebastiano

Reputation: 12339

I've started writing a series of articles that deal with several aspects of creating an application for Android TV. I will update this answer every time a new one is released:

EDIT

I've just published the second article. List updated.

  1. Building for Android TV
  2. Let's go custom
  3. Bells and whistles

Upvotes: 1

rekire
rekire

Reputation: 47985

This answer is still work in progress.


What do I need to keep in mind for a great TV experience?

A good point to start is the Android documentation Building Layouts for TV. The Amazon Design and User Experience Guidelines. At my current point of knowledge I think it should be no problem to mix that resources for both TV platforms.

I would also check this resources:


Can I share code with my TV app?

You can share all code you currently use. You just need to extend the manifest to make sure that it will been displayed correctly on the TV.

For integration on the Android TV launcher you need to add this category to integrate it:

<category android:name="android.intent.category.LEANBACK_LAUNCHER" />

Read more about that here.

Amazon does it in a quiet other way, right now I'm not familiar with it however it seems that you need to publish your app first to get a launcher integration. But you can always start your app by using the settings and managing apps.


Can I reuse layouts, strings and other resources?

Yes you can. I figured out that you can use the -w960dp suffix to restrict resources to the TV platform. There is no need to create a seperat app to support TVs.


Are there some best practices to implement great apps?

In attention to that suffix I refered above you define differnt resouces for your desired target device type.

So if you use this layout:

<TextView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:text="@string/hello"/>

You can define this resources:

values/strings.xml:

<string name="hello">Hello mobile</string>

values-w600dp/strings.xml:

<string name="hello">Hello tablet</string>

values-w960dp/strings.xml:

<string name="hello">Hello TV</string>

That would produce a correct hello for all platforms (wearable are always a separate project).

Upvotes: 6

Related Questions