Appstore Blogs

Appstore Blogs

Want the latest?

appstore topics

Recent Posts

Archive

Showing posts tagged with FAQ

April 17, 2014

David Isbitski

Amazon Fire TV offers your existing Android apps an entirely new set of potential customers to engage with. It also gives your customers the ability to experience your app across Kindle Fire Tablets, Android phones and tablets, and now Amazon Fire TV – all through the same Amazon Appstore. If a customer has already bought your app that you have made available for Fire TV, they can download it onto their new Amazon Fire TV instantly, without having to purchase an additional version. 

Adding Amazon Fire TV support to your existing Android App is as simple as following a few guidelines, compiling and uploading a new TV version of your apk, and then adding Amazon Fire TV as one of your app’s device targets inside the Developer Console.  

Amazon Fire TV opens up new discoverability possibilities for your app across many new customers. Most updates to your apps for Amazon Fire TV should be minor, and if you have been following the guidelines from Android on Designing for Multiple Screens all along, your app may already be ready for a large TV resolution. 

While you may be familiar with targeting Android tablets and phones, there are a few things you need to consider for your app to run correctly on Amazon Fire TV. This includes understanding the layout, dimensions and orientation of Amazon Fire TV views, changes to the user experience when interacting with a TV (10’ away on average), UI and navigation patterns, as well as some other TV-specific gotchas such as overscan and color reproduction.

Understanding Amazon Fire TV Video Output

You can think of the Amazon Fire TV screen as an Android device that is locked to landscape orientation, with a constant width of 960dp and with a height of 540dp. The rendering surface is always 1920x1080 with a screen density of 320dpi. Output is automatically scaled for 720p and 480p output resolutions.

The following table shows how the various video outputs of Amazon Fire TV map to their Android counterparts.

TV setting

Output resolution

(pixels)

Render surface

(pixels)

Density identifier

screen density

(dpi)

Display resolution

(dp)

Screen size identifier

1080p

1920 x 1080

1920 x 1080

xhdpi

320

960x540

large

720p

1280 x 720

1920 x 1080

xhdpi

320

960x540

large

480p

640 x 480

1920 x 1080

xhdpi

320

960x540

large



By following the Android best practices guide for Supporting Multiple Screens, you can create a different layout configuration just for Amazon Fire TV so that your existing layout adapts when it runs on the device. This is the same process you are most likely already using for generating different drawables and layouts and including them in your app’s /res directory. 

You can get a detailed overview of the resource configurations available for Amazon Fire TV here.

Thinking About the 10-Foot User Experience

TV interfaces in general are often referred to as 10-Foot User Interfaces (10-ft UI) because the user is viewing the screen from 10 or more feet away. Although the screen itself can be very large, the screen resolution is lower, and distance from the screen means a smaller angle of view.

The design choices you would make for an application or web page running on a desktop computer, tablet, or phone are fundamentally different from those of a TV, as users typically view those screens from much closer distances. In addition, as the television is used in a more relaxed fashion than a computer, a tablet or a phone, the UI on the TV should not require as much attention and precision. 10-ft UI may require you to rethink the design, layout, and navigation of an existing app.

Keep the design of your screen in a 10-ft UI simple and clean, with low information density. Limit the number of design elements or UI components (menus, buttons, images) on the screen, and ensure that those elements are large enough and spaced far enough apart to be read from a distance. Present a clear set of actions or options for each screen. Minimize the amount of text, as users do not read a lot of text on a television screen. Avoid requiring the user to input a lot of information and provide reasonable defaults where possible.

In your existing Android app for a phone or tablet, you can assume that touch is always present, and your UI elements reflect that. For example, if I run the existing Android Snake Game from my AWS re:Invent 2013 demo on a Kindle Fire, tapping the menu button with my finger brings up the standard Android options menu.

Figure 1- Android Options Menu for Touch on Kindle Fire

However, running the same app on an Amazon Fire TV shows a slightly different experience when interacting with the options menu. Instead of tapping our finger on a screen, we press the Menu button on the Amazon Fire TV remote or game controller, which brings up the Android options menu with the first item in the ListView (“New Game”) automatically highlighted.

Figure 2- Android Options Menu on Amazon Fire TV automatically highlights currently selected item for the user

This allows your users to know exactly where they are in the options menu. Pressing the SELECT button on the remote (the A  button on a game controller) raises that UI element’s ItemSelected event . 

Note that all of this works automatically, and you do not have to wire up any of the on screen highlighting for any of your user interface elements – that is done for you by FireOS itself. This does, however, affect the flow of interaction your customer has with your app when using a remote or a controller. Thoroughly test your app running on a TV screen with a remote or controller and make changes to the interaction where appropriate. 

For more helpful tips on modifying your app to work with remote and controllers be sure to check out our post with helpful tips.

Updating Your Android Views for TV

The Amazon Fire TV screen is always displayed in landscape orientation, with a display resolution of 960dp wide and 540dp high. In terms of Android supported screen size configurations, you should target large. If you have not created any large-screen assets, you need to verify that your existing sizes scale well.

Depending on the orientation you are using for your existing Android app, you may see some inaccurate screen sizing when running against the TV screen for the first time. In the example below I am using the code from my previous Ad Mediation post, which was set to run in portrait. 

Figure 3- App scaling and running in forced landscape

The first time the app runs you can see the scaling that occurs to accommodate the device screen size for an app forced into portrait mode. To fix this, call setRotation on any View like so:

 
myView.setRotation(90f);

This rotates the current view 90 degrees and places it into landscape mode. Another way to do this is to set the orientation of your main view inside of its layout file so that all children are rotated as well.

In fact, simply updating the orientation of the View of my main activity to run horizontally instantly fixed all of my screen issues and my app ran perfectly.

Figure 4- App scaled correctly and set to landscape

When testing out the Snake Game from the above example, I encountered a similar scaling and rotation issue.

Figure 5- Snake Game Demo running incorrectly

Instead of setting the orientation of the entire View you can also change the orientation of your activity itself. For example, inside the androidmanifest.xml file for my game, I provided an attribute for the orientation of the SnakeGameActivity.

Setting the android:screenOrientation to be landscape fixed all scaling issues with the game and made it instantly playable.

Figure 6- Snake Game fixed and running in landscape

With just a few adjustments to your apps’ Android Views and updates to their associated resource images, your apps can be displayed on an Amazon Fire TV connected screen with minimal changes.

Understanding TV Overscan, Text and Color

Overscan is the physical space TV hardware manufactures reserve around the displayable area of a TV screen and something you should be aware of when targeting Amazon Fire TV with your app. This space can exist on TVs of any size and limits the area in which your app is able to render its user interface. 

Figure 7- TV Overscan examples.

To avoid any issues with overscan, I recommend that you avoid placing any of your app's UI elements within the outer 5% of any edge on the screen.

Any onscreen text or UI elements should be fully within the inner 90% (the safe zone) of your user interface. Your text should also use larger type sizes (at least 14sp) so that they are viewable on large screens. Amazon Fire TV uses Helvetica Neue Regular as the system font throughout all of the system’s interfaces.

When testing your app you may also find that the colors are not represented the same when shown on a TV display as they are on a tablet. Because TV screens have a higher contrast, they have a tendency to make colors seem more saturated, brighter, and vibrant. The range of colors that can be displayed is also less than that of a PC or mobile device screen. Cool colors (blue, purple, grey) work better than warmer colors (red, orange) on a TV and a good rule to follow is to avoid using less saturated colors in your apps.

Figure 8- Color Saturation on TV Displays

Understanding Amazon Fire TV Navigation

If you choose to add an updated user interface to your app to better match that of Amazon Fire TV’s UI, there are a couple of guidelines you should follow. 

Figure 9- Navigation Screen Types on Amazon Fire TV

All navigation starts with the home screen which consists of a global navigation menu on the left and a set of content tiles on the right. 

Figure 10 - Home Screen

The global navigation menu is the primary system menu. It appears in a row on the left side of the screen. The global navigation menu allows the user to choose major content categories or other options including Search, Home, Movies, TV, Music, Games, Apps, and so on. Each item in the global navigation menu can be selected with the Up and Down directional buttons.

When the user focuses on any item in the global navigation menu, the home view for that node appears on the right side of the screen. Each node has its own home view with its own content. The overall system home view, sometimes called the launcher, is accessible with the Home key on the Amazon Fire TV remote, or by selecting Home from the global navigation menu.

Figure 11- Outer Space Has Been Focused on by User

Each home view contains multiple horizontal content rows. The title tile for the row indicates the type of content (for example, Most Popular, My Movies, Recommended for You). The remaining tiles show examples of that content. From these content rows, the user can:

  • Navigate between rows with the Up and Down directional buttons.
  • Move back to the navigation menu with the Left button.
  • Choose Select or Right to select a row and view a 1D list for that row.

Be sure to check out the Design and User Experience Guidelines for additional information on all of the screen types and important tips on creating an engaging user experience for Amazon Fire TV.

In addition to the global navigation, menu notifications are also displayed in a certain way within the base Amazon Fire TV user interface.

Figure 12- Informational Notification

Amazon Fire TV includes three kinds of notifications you can use inside of your own apps: Informational, Media and Modal. Informational Notifications can be used for general messages to the user, with optional actions. Media Notifications are used when the user is interacting with media inside your application (music with artist and title for example). Modal notifications are used for alerts that require user input. Modal notifications may appear at any time over your application. A modal notification takes the focus and the user must take actions to dismiss that notification.

Note: Modal notifications can only be generated by the Amazon Fire TV user interface in response to critical issues (such as an unavailable network connection). System-wide modal notifications cannot be generated by individual apps. You can use alert dialogs (AlertDialog) to create modal alerts within your app.

Figure 13- Modal Notification

Amazon Fire TV Notifications are slightly different from standard Android Notifications. Although the API for Android notifications is available in the Amazon Fire TV SDK, and apps that use that API will compile, standard Android notifications do not appear in any way on Fire TV. You must convert your app to use the Fire TV notifications API. 

One you have installed the Amazon Fire TV SDK Add-on, you will then need to import the Amazon device notification namespaces:

	import com.amazon.device.notification.AmazonNotification;
	import com.amazon.device.notification.AmazonNotificationManager;

Next, use AmazonNotification.Builder to create a notification object, as you would a standard Android Notification. The AmazonNotification.Builder class has a new required method, setType(), which indicates the type of notification. You have these notification types to choose from -- TYPE_INFO maps to Information Notifications and TYPE_MEDIA corresponds to Media Notifications.

Once you decide on the type of Notification to create you need to set up the Builder object like below:

 	AmazonNotification.Builder builder = new AmazonNotification.Builder(getApplicationContext());
	builder.setSmallIcon(R.drawable.notification_icon);
	builder.setContentTitle(title);
	builder.setContentText(text);
	builder.setType(AmazonNotification.Builder.TYPE_INFO);

Lastly, register the Notification object with the AmazonNotificationManager, as you would a standard Android Notification. You should also assign it an ID to update or cancel the Notification later.

 
        AmazonNotificationManager notificationManager = (AmazonNotificationManager)     
        getSystemService(Context.NOTIFICATION_SERVICE);
        notificationManager.notify(notificationId, builder.build())

Please note that unlike the Kindle Fire, there is currently no Notification Tray on Amazon Fire TV so if your customer is in an immersive mode app, they will not see the Notification.

For full details and more sample code on implementing notifications, check out our developer documentation here.

Handling Web Content

If your app contains any web content, you will need to do some slight modifications. By default, Amazon Fire TV does not include a Web Browser, but web content is allowed using the Android’s WebView. To use web content, set the WebClient of the WebView and override url overloading. This can be done by calling the setWebViewClient method of the WebVew to a new WebViewClient whose shouldOverrideUrlLoading property has been set to return false. 

This code ensures that your app does not attempt to load an external browser with web content and instead loads it into the WebView. You can see the url being loaded successfully into the WebView below.

Figure 14- WebView HTML content loaded successfully

Note that if you attempt to do a direct call to WebView.loadUrl without setting a new WebViewClient whose shouldOverrideUrlLoading method returns false like above you will see an error like this one:

Figure 15- webview.loadUrl security message

If you would like to link to other apps on the Amazon Appstore, for example, to cross-promote your own offerings, you can also use Android Intents with amzn:// urls, just as you can on the Kindle Fire. If you “deep link” to an app that is not ready for Amazon Fire TV we still show the detail page for the app, but customers are not able to download it. Check out this post for more information.  

Conclusion

Once your app is updated for Amazon Fire TV, your app’s listing on the Amazon Appstore runs across all the available devices you chose when you submit your app. Customers pay for your app once and begin to engage across all of their Kindle Fire tablets, Android phones and tablets, and now Amazon Fire TV. The opportunities for your customers to discover and engage with your app continue to grow!

In addition to the tips I’ve included here, be sure to check out these additional resources:

Purchase an Amazon Fire TV

Amazon Fire TV SDK Frequently Asked Questions

Amazon Fire TV SDK

Device Specifications

Display and Layout

User Interface

Design and User Experience Guidelines

Android Developer Multiple Screen Guidance

Supporting Different Screen Sizes

Supporting Different Densities

-Dave (@TheDaveDev)

 

February 16, 2014

Peter Heinrich

If you are attending Mobile World Congress in Barcelona, join us at WIPJam! WIPJam is an event within the event dedicated to developers, taking place in Hall M5 in Fira Montjuic (Old Fira) from February 24-27. It is the largest DevCon during Mobile World Congress and is full of sessions, training seminars, hackathons, UnPanels, and developer storytelling. We’re excited to be hosting DevCon Workshop sessions, hosting several hackathon categories, and a booth. Learn more about WIPJam here.

There are several ways you can meet and engage with our team at WIPJam. Learn more below.

Attend a DevCon Workshop

Monday, February 24, 2014 | Room 5, Level 3, Hall M5 | 11am-1pm CET

5 Tips for Monetizing Your App in a World Moving Towards Free Downloads

Speaker: Jesse Freeman, Developer Evangelist

Focus on What Matters: Accelerate Your Development with Amazon Cross Platform Services

Speaker: Paul Cutsinger

Tuesday, February 25, 2014 | Room 6, Level 3, Hall M5 | 1pm-3pm CET

Android to Amazon: Tips for Painless Submission to the Amazon Appstore

Speaker: Dave Isbitski, Developer Evangelist

Reaching New Customers with Your HTML5 Web Apps through the Amazon Appstore

Speaker: Dave Isbitski, Developer Evangelist

 

Enter one of our Hackathon categories

1.       Adopt an Amazon Cross Platform Service in 48 hours

2.       Port Your Android App to Kindle Fire in 24 hours

Visit our booth in the Expert Tables area

Stop by our booth and learn more about distributing your mobile apps and games through the Amazon Appstore, meet with our marketing and technical representatives, and get information about running your apps in the cloud from our friends at Amazon Web Services.  Or just stop by when you need a few minutes to recharge, and play some games on Kindle Fire HDX. We will be set up Monday-Wednesday on Level 1, Hall 5, Fira Montjuic. 

 

August 14, 2013

Mike Hines

We’ve gotten a few questions recently about Adobe AIR support on Kindle Fire. Here is the quick FAQ:

Do Kindle Fire devices have Adobe AIR embedded?

Yes.

The Original Kindle Fire has Adobe AIR 2.7.1 embedded as a Shared Runtime. The Kindle Fire, Kindle Fire 7” HD, and the Kindle Fire 8.9” HD devices (the Kindle Fire devices running ICS) all have Shared Runtime support for Adobe AIR 3.1.

Can I use a newer version of AIR for my app?

Yes.

The current version of Flash Builder includes support for Captive Runtime, a way that you can package the most recent version of Adobe Air with your app. Everything you app needs to run is packaged directly into the apk. Note: The ADT –package command is now packaging AIR 3.7 and higher as a Captive Runtime by default. See this note from Adobe for more details.

Does Kindle Fire have any Adobe AIR Native Extensions (ANEs)?

Yes.

We have two free Adobe AIR Native Extensions for the Kindle Fire. One for In-App Purchasing, and another for GameCircle integration. You can read the press release here.

 

Want the latest?

appstore topics

Recent Posts

Archive