Geeks With Blogs
Bill Osuch - Random geek notes

Developing for the Kindle Fire is pretty much the same as developing for any other Android device (aside from Amazon’s long review process…). Amazon’s developer FAQ lists most everything you need to know, but I’ve stolen summarized it here:

Will my app work on Kindle Fire?
For your app to work on Kindle Fire, it needs to be compatible with the device's specifications. At a high level, it must be optimized for non-Google Mobile Services (GMS) Android 2.3.4 (Gingerbread) and a 7" screen with a resolution of 1024 x 600. Your manifest should specify support for large screens. Your app cannot require a gyroscope, camera, WAN module, Bluetooth, microphone, GPS, or micro-SD to function. In addition, your app must not be a theme or wallpaper that manipulates the user interface of the device or customize the lockscreen.

We also recommend that you test your app on your own and submit an update if you discover any problems. It is possible to configure a standard Android emulator to simulate the Kindle Fire device platform. You should configure your emulator with the following characteristics:

  • *Width: 600px
  • *Height: 1024px
  • Abstracted LCD Density: 169
  • Target: Android 2.3.4 - API Level 10
  • RAM: 512 MB

*Note: The device will reserve 20px to display a soft key menu, making the effective portrait resolution 1004px high x 600px wide and the effective landscape resolution 580px high x 1024px wide.

What are the dimensions of the status bar (time, battery, signal strength, etc.) on Kindle Fire?
The status bar is 40px high.

My app requires access to Google Mobile Services. Will it work on Kindle Fire?
Apps that run on Kindle Fire do not currently have access to Google Mobile Services (GMS). If your app currently requires access to GMS apps or services, we recommend that you either remove the features that require these services or modify them to degrade gracefully when invoked (e.g. with an error message such as "This feature is not currently available on this device").

My app uses Google's in-app purchasing technology. How can I make it work on Kindle Fire?
Because Google's in-app purchasing technology requires access to Google Mobile Services, it will not work on Kindle Fire. We are working on a solution that will let you sell digital content in your apps using Amazon's merchandising and payments technology. Our solution is currently in Beta and available by invitation only. If you would like to join the waiting list for the Beta, please complete and submit this form, and we will follow up with more information as soon as possible.

Can I write to the internal SD card on Kindle Fire?
Using getExternalStorageDirectory() will enable you to write to the internal SD card on Kindle Fire.

What specific features does Kindle Fire support?
Kindle Fire supports the features in the following list. To ensure your app is compatible with Kindle Fire, it should only use features found in this list.

Type Descriptor Comment
Sensors android.hardware.sensor.accelerometer Your app requires an accelerometer.
Sensors android.hardware.sensor.light Your app requires a light sensor.
Screen android.hardware.screen.landscape Your app requires landscape mode.
Screen android.hardware.screen.portrait Your app requires portrait mode.
Touchscreen android.hardware.touchscreen Your app requires touchscreen capabilities that are more interactive than basic touch events.
Touchscreen android.hardware.touchscreen.multitouch Your app requires basic two-point multi-touch capabilities.
Touchscreen android.hardware.touchscreen.multitouch.distinct Your app requires the ability to track two points fully independently.
USB android.hardware.usb.accessory Your app requires that the device or the app itself behave as a USB device (and connects to USB hosts).
Wi-Fi android.hardware.wifi Your app requires 802.11b/g networking.

How should I configure the supports-screens element for compatibility with Kindle Fire?
To ensure your app is compatible with Kindle Fire, specify <supports-screen android:largeScreens="true"/> in your manifest file.

Is it possible to make the soft key menu on Kindle Fire visible at all times instead of partially hidden?
To keep the menu bar present at all times, remove any code in the activities that enables full screen mode. The soft key bar at the bottom will then be visible at all times. Sample code to remove: getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);

Is the disable_keyguard permission supported on Kindle Fire? If my app customizes the lockscreen/attempts to disable the keyguard during use, will it be compatible with Kindle Fire?
Kindle Fire does not support apps that contain disable_keyguard permissions or customize the lockscreen.

I have set up an emulator per the specification in the Kindle Fire FAQ, but the screen is being recognized as an x-large screen instead of a large screen, and loading assets accordingly. How can I fix this?
The Android emulator seems to be misreporting the screen size as x-large instead of large with our standard emulator configuration. To override the configuration, complete the following on your activity onCreate method (before loading layouts or anything else):

final Configuration config = new Configuration(context.getResources().getConfiguration());
config.screenLayout = (config.screenLayout & Configuration.SCREENLAYOUT_LONG_MASK) + Configuration.SCREENLAYOUT_SIZE_LARGE;
context.getResources().updateConfiguration(context.getResources().getConfiguration(), context.getResources().getDisplayMetrics());

This will ensure the emulator configuration properly uses the large screen size and loads the appropriate assets.

Technorati Tags: ,

Posted on Tuesday, March 13, 2012 2:08 PM Android , Kindle | Back to top


Comments on this post: Android–Setting up a Kindle Fire emulator

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Bill Osuch | Powered by: GeeksWithBlogs.net