Since Android and Kindle both use Java, I was eager to see what kind of native app I could put together in an "extremely short" amount of time. I wrote up the Android version first, and then turned my effort towards the Kindle.
Developing a native app for the Kindle (E-Ink) is a very different experience than Android (obviously).
- The first hurdle was gaining access to the Kindle Developer Kit (KDK). Amazon restricts access to this program, which means the developer tools and API aren't freely accessible. Even the official KDK forums are "invitation only".
- At the time, the KDK only supported Java 1.4, which was severely limiting, because some of my favorite Apache libraries required Java 5 (annotations!)
- Another limitation was that raw Sockets were not allowed, which negated my ability to use the Apache HttpClient, which used a Socket, not a URLConnection. In the end, I had to code up my own cookie-handling HTTP Client from scratch using the KDK Connection. This was needed to communicate with the central server and receive the JSON data.
- I had to get the signing keys so that I could deploy my app to a real Kindle.
- The widget library is very basic - there wasn't a checkbox widget, nor radio buttons, so I had to write my own widgets.
- The 3rd gen Kindle decided to omit the row of keys for numbers (which was present on the 2nd gen), which made it really hard to answer numeric math problems. Fortunately, you could use "Alt" plus the top row of keys - but the Kindle didn't have that screen-printed on the device. Instead, Amazon recommended that your app display "soft-keys" at the bottom of the scree.
In the end, I managed to get something "highly usable" in time for the conference.
Here's the login screen:
And here's a sample question, which demonstrates the "custom checkbox" widget for the multiple-choice selection. Some questions were single selection, so it had to act like a Radio Group, and other questions were multi-select, so it would have to act like a bunch of check-boxes:
Not surprisingly, the "finished app" was ridiculously small and took no time to transfer over the wireless connection.
In the end, it was yet another great geeky experience!
Post a Comment