Saturday, January 21, 2012

Kindle Fire Application Development Limitations


In an IDC survey of more than 2,000 developers worldwide, the Amazon Kindle Fire garnered the second-most interest from developers among 15 Android tablets — second only to the Samsung Galaxy Tab. In North America, it was the top tablet, and the percentage of developers who said they were interested in developing for it was just four points less than the percentage who were interested in developing for the iPad before its launch in April 2010.

The tablet already lacks features such as a camera, GPS and an external microphone that render many apps useless. There are “No Google” services for Kindle. The modified Android for Kindle is different from the actual Android OS. Based upon the Android 2.3.4 OS, Kindle OS lacks following:
  • Google services like C2DM (for push notification), Google Maps, and Location based API’s are not available.
  • Amazon has its own Amazon store for the applications. No Android Store.
  • Debugging the Kindle app from developers perspective requires little tweaking.
  • No Android updates, like upgrading to HoneyComb or Ice Cream Sandwich.
  • Limited Hardware support as Camera, GPS and Microphone are not available.
  • Changed User Interface from the default Android provides UI.

For developers who want to use the Push Notification or GPS/Location based features, have to use some external tools to program their application.

  • Push notifications: For using push notifications, one can use Urban Airship helium. Helium is Urban Airship’s proprietary push messaging service, and is the default transport for the library.

           URL: http://urbanairship.com/docs/android-client-push.html

  • Location: Amazon Fire supports Skyhook sdk, which can be used for determining the location. Skyhook collect raw data from Wi-Fi access points, GPS satellites and cell towers with advanced hybrid positioning algorithms. By leveraging the strengths of more than one underlying position technology, Skyhook's Core Engine provides the best possible location available in any environment.

           URL: http://www.skyhookwireless.com/

  • Maps: MapQuest SDK for Android can be used. MapQuest has been providing valuable solutions to solve business challenges since 1997, with a focus on reliability and service. They were the first major mapping site on the internet.

           URL: http://developer.mapquest.com/web/products/beta/android



Sunday, January 15, 2012

Debug Kindle Fire Application


For Windows users

Follow the above instruction and the adb_usb.ini file is located here:

1. Use a text editor and open the file adb_usb.ini. It's located at c:\Users\[User-Name] \.android\adb_usb.ini.
2. Then add 0x1949 to the end of the file.
3. Next save the file.
4. Next you will need to edit the file android_winusb.inf file. Use a text editor and open up this file 
C:\Program File(x86)\Android\andorid-sdk\extras\google\usb_driver 
(note: if you install your android sdk somewhere else then go to that location). When you installed Android SDK, the USB Driver package will also be there, if not you will have to download it. Note: if you can't edit the file ensure you have write permission to do so.
5.  Under section [Google.NTx86] and [Google.NTamd64] add the following:

;Kindle Fire
%SingleAdbInterface% = USB_Install, USB\VID_1949&PID_0006
%CompositeAdbInterface% = USB_Install, USB\VID_1949&PID_0006&MI_01

6. Now save the and close the file.

When you connect the Kindle Fire to the PC, it will not recognize the device hardware so you will need to install the USB driver. Here's how:

1. Using the USB cable plugin the Kindle Fire to the computer.
2. Open Device Manager from My Computer.
3. Open Other devices on the right pane.
4. Right click Kindle > Update Driver Software.
5. The click on Browse my computer from driver software.
6. Next click on Browse button, and find the file android_winusb.inf at C:\Program Files 
(x86)\Android\andorid-sdk\extras\google\usb_driver. If you install the SDK somewhere else then go to that location. If you come across any driver errors, then download the drivers for Win7 from here. Unzip and point the setup to this directory home.
7. Now click Next.
8. Select Install this driver software anyways. 
9. Now check your Device Manager and see if you could see Android Phones > Android Composite ADB Interface.  
10. Now you can restart the ADB Server to get an update.
11. Go to the folder android-sdk\platform-tools\.
12. Run adb kill-server.
13. Run adb start-server.
14. Run adb devices.


For MAC User

1. From the Home screen tap on the Quick Settings  icon.
2. Next select More.
3. Select Device.
4. Switch on "Allow Installation of Application From Unknown Sources".
5. Next connect the Kindle Fire to the MAC.
6. Then use an editor to open the file ~/.android/adb_usb.ini.
7. Now you will need to add the Vendor ID text "0x1949" at the end of the file.
8. Save the adb_usb.ini file.
9. Then restart the adb server process with this command "adb kill-server" and "abd start-server". This will restart the process and read the new value from the file.
10. Now run "adb devices" to see your device appears.

You may need to have your computer restart to see the changes.

Kindle Fire Application Development


The Kindle Fire is a tablet computer version of Amazon.com's Kindle e-book reader. Announced on 28 September 2011, the Kindle Fire has a color 7" multi-touch display with IPS technology and runs a forked version of Google's Android 2.3 (Gingerbread) operating system. The device — which includes access to the Amazon Appstore, streaming movies and TV shows, and Kindle's e-books — was released on November 15, 2011.
Amazon initially planned to build 3.5 million Kindle Fire devices in the first production run. Due to customer demand this was later increased first to 4 million and subsequently 5 million devices. Clearly there is going to be a large market waiting for any applications developed for the Kindle Fire.

Setting Kindle Development Environment with Eclipse

System Requirements
Kindle Fire application development may be performed on any of the following system types:
Windows XP (32-bit)
Windows Vista (32-bit or 64-bit)
Windows 7 (32-bit or 64-bit)
Mac OS X 10.5.8 or later (Intel based systems only)
Linux systems with version 2.7 or later of GNU C Library (glibc)

Installing the Java Development Kit (JDK)
Kindle Fire development requires the installation of the Java Platform, Standard Edition Development Kit version 5 or later. Java is provided in both development (JDK) and runtime (JRE) packages. For the purposes of Kindle Fire development the JDK installation must be installed.

Download Eclipse IDE
You can download the eclipse IDE from here.

Installing Android Setup on Eclipse
1. Download the Android SDK, unzip it and place it at some location on your system.
2. Install and configure ADT plugin.

Creating a Kindle Fire Android Virtual Device (AVD)
An Android application for the Kindle Fire may be tested by installing and running it on either a physical device or in an Android Virtual Device (AVD) emulator environment. Before an AVD can be used it must first be created and configured to match the specification of the Kindle Fire.

Kindle Fire AVD Specifications
In order to provide accurate emulation of a Kindle Fire an AVD will need to be created with the following properties:
Target - Android 2.3.3 (API Level 10)
Resolution - 600 x 1024
Device RAM Size - 512Mb
Abstracted LCD density - 169

Begin the AVD creation process by clicking on the New… button in order to invoke the Create a New Android Virtual Device (AVD) dialog. Within the dialog, perform the following steps to create a Kindle Fire compatible emulator:
1. Enter a descriptive name (for example KindleFire) into the name field. Note that spaces and other special characters are not permitted in the name.
2. Use the Target menu to select the Android 2.3.3 – API Level 10 SDK option.
3. In the Skin section select the Resolution option and enter 600 x 1024.
4. Click on the current Abstracted LCD Density value located in the Hardware section and change it to 169.
5. Click on the Device ram size value and change it to 512.

Creating Sample Application
1. To create the new project, select the File -> New -> Project… menu option. In the resulting Select a Wizard dialog unfold the Android category and select Android Project from the list
2. With the Android Project option selected click on the Next > button to proceed with the creation process. In the Create Android Project window name the project KindleSampleApp and leave the remaining options set to the default settings before clicking Next > to move to the Select Build Target screen
3. The screen will display a list of SDKs currently installed on the system. For the purposes of this example, select the Android 2.3.3 SDK and deselect any other SDKs which may currently be selected.
4. With the correct SDK target selected, click on Next > to proceed to the Application Info screen. Here you need to add various details for the app.
Application Name: KindleSampleApp
Package Name: inder.kindle.sample.app
Activity: HelloWord
MinSDKVersion: 10
5. To run the application, application name in the Project Explorer and select Run As -> Android Application from the resulting menu.