Comparing Kindle and Android Development

In January, Amazon announced the Kindle Development Kit, which will enable developers to create applications running on the popular wireless-enabled portable e-book reader. Since Kindle apps will be written in Java, the greatest potential would be for developers currently working on Java Micro Edition or Android applications.

In January, Amazon announced the Kindle Development Kit, which will enable developers to create applications running on the popular wireless-enabled portable e-book reader. Given the fact that there are a lot of Kindles out there owned by people who are used to buying e-book applications through Amazon for real money, this has to be interesting to programmers currently creating portable applications.

Since Kindle apps will be written in Java, the greatest potential would be for developers currently working on Java Micro Edition or Android applications. I thought that the possibility for overlap between Kindle and Android development was worth investigating. Here is what I found.

Kindle Hardware Limitations

The Kindle display is of course optimized for long battery life and grey scale readability. Right now developers only have to worry about two screen sizes: the 6" unit at 600x800 pixels and the 9.7" at 1200 x 824, but larger screens are likely to be developed. The built-in accelerometer can detect whether it is being held in landscape or portrait mode. Kindles also have a full qwerty keyboard, some additional control keys and speakers. Current versions do not provide a touch interface—a glaring deficiency to users accustomed to touch control of phones for several years— but Amazon recently bought a touch-screen company with technology that supports multi-touch.

Android Hardware Possibilities

I have to say "possibilities" because Android is very open-ended with respect to both the user interface hardware and supplemental goodies. Phones using Android start as small as 240 x 400 screen size and go up. The screen will always be touch sensitive but there may or may not be a keyboard. Furthermore we continue to see rumors of Android enabled tablet and netbook PCs which will compete with Apple and Microsoft operating systems, so much larger screens may be in Android's future.

Android developers have to be prepared to cope with a variety of screen dimensions but they can assume that color will be available. A variety of image file formats, both static and moving, and HTML marked-up text display are provided for. The Android approach to embedded sensors is flexible. In addition to the camera, which seems to be expected for all phones these days, an accelerometer, compass and GPS navigation are provided. Current phone examples don't support multiple touch detection but this is an obvious extension which will require a new SDK version.

The Kindle Java Implementation

The attempt to define a subset of Java for resource-limited devices has a long and complex history. Some version of Java Micro Edition (JME, also called J2ME in some references) is embedded in many millions of cell phones and embedded processors. Determination of the required classes in the Personal Basis Profile 1.1 version used as a starting point in the Kindle is handled by a Java Community Process JSR 217. This version is most closely related to Java standard edition 1.4, so it has been around a while. Developers of JME phone and other embedded applications should find this aspect of Kindle development to be familiar.

Kindle Development Kit extensions that build on JME are numerous. As you might expect, these support Kindle style graphic interface components and network connectivity. User interface component classes are descended from the standard java.awt.Component class and are not related to the components in the javax.swing packages. This is an important design decision because interfaces built on swing can involve a lot of extra object creation, while AWT components work more closely with the underlying operating system. Developers will have to create interfaces which look like the Kindle standard.

The Kindle Developer Kit FAQ page mentions support for JSON and XML parsers, HTTPS networking and other features which will be essential for a modern mobile application. However, the actual JavaDocs for the com.amazon.kindle.etc packages version 1.0 online at this time do not document these classes. These extensions are clearly a work in progress.

The Android Java Implementation

Android Java uses a custom JVM optimized for low power consumption. The class library includes many but not all of the familiar packages from Java 1.6 plus a number of classes specific to the android user and hardware interfaces. In contrast with Kindle, Android GUI elements are not derived from the standard Java library. The general interface building principles based on a variety of View-derived components organized by layout managers and generating events will be familiar to all Java programmers. There are many unique features for creation of user interfaces including an optional declarative approach to specification of graphic elements using XML.

One important point about the Android environment for developers is that it is an open-source development supervised by the Open Handset Alliance, a consortium of dozens of major hardware manufacturers and mobile communication operators. Android licensing is modeled on the highly sucessful and very flexible Apache 2.0 License.

Data storage under Android reflects a concern for security. There is no common file system visible to all applications. Instead, each application can control its own data sharing. There is a built-in SQL database using the open source SQLite tools. Resources such as images and XML documents can be compiled into compact formats packaged with the application code.

Summary

It appears that the Kindle development environment is so different from Android that there will be no easy way for Android applications and developers to migrate. Furthermore, we see a lot of announcements of support for Kindle-formatted books and other resources on a variety of phones, netbooks and tablet computers which may be running Android, so Kindle-style resources may end up being displayed on Android devices.

Resources

Kindle Development Kit news announcement Jan. 21, 2010

JavaDocs for the JME version (JSR 217) which is the base for Kindle development.

Kindle v1.0 specific packages.

Overview of various Java Micro Edition versions.

JavaDocs for Kindle extensions.

My article on Android architecture.

Home page for the Open Handset Alliance

Dig deeper on Mobile application development

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchSoftwareQuality

SearchCloudApplications

SearchAWS

TheServerSide

SearchWinDevelopment

Close