Amazon Kindle

Amazon Kindle Application Development Tutorial – Part 3

Posted on Updated on

Kindle Application Lifecycle

Hello everyone.
Hope you are fine and doing good in your daily routine.

Here is the 3rd part of my series of tutorial on Amazon Kindle Application Development.

Note : So far we have discussed following topics in this category.

In this part I will describe some core concept that one must know before starting development on kindle plateform. It includes life cycle of kindle application and some other key points we have to care during code.

Earlier i was going to start hello world tutorial but i felt these things should discuss first so that when one start writing his first program he/she should clear about whats going on at backend. So let start.

I have bring my bowl of “fruit chaat” but my music player is silent today. I’m not in mood of listen any track, but while reading these lines; don’t forget to follow the traditions. You must have something to eat and listen, having relax seat in your chair …

Orite here we go ..

Active Content

First of All we need to know what is “Active Content” are. Within the community of kindle developers you will hear this term time and again. Active contents are noting but the apps runs over kindle device. Simply the apps for kindle, here we called them “active content”. Simple it is.


Technically, kindlet is an interface in kdk (kindle development kit). We extends its subclass and write our code. At little abstract level, the main entrance of our kindle application is called kindlet.

For example like any java program must have a class that contains main() method; to start application from that point (.i.e.  via main() method) same in case of kindle app, there must be a class that must extend subclass of kindlet interface (AbstractKindlet class) and hence become entry point of our kindle app. Such class is normally refer as kindlet of our kindle app.

In more concise words, if someone asks you where is your kindlet, then it means he/she is asking about the entry point of your kindle application, the class which extends the subclass of kindlet interface of kdk .i.e  AbstractKindlet class.

Lifecycle of Kindle application

Like every application, active contents have also a defined life cycle. Our application move in between these life cycle phases during its execution and terminates from its exit point.  There are four phases application move among. They are

  • loaded
  • ready to run
  • running
  • shutdown

when application jumps into a phase, a specific method is called, defined in kindlet interface. These method calls and phase changes are very well defined until any unchecked exception is thrown, that causes the active content to die/shut down and user will see crash. Now as application crashed, there isn’t no surety whether the life cycle will complete normally or will terminate immediately.

The kindlet method associates with above mentioned phases are

  • create()
  • start()
  • stop()
  • destroy()

Refer the following image describing the phases and method calls during the life cycle of kindle application

{src : kdk documentation}

Lets discuss different phases of life cycle


When we chose a kindle application to run, its kindlet initialized, along with other static initialization of application. Once this happened, its means kindlet object has been constructed and properly initialized, hence application has LOADED.

At this stage, we don’t see any screen/user interface at user end. Its all occurred at backend. At developer lever, we don’t have access to persistent storage; we haven’t access to application environment/context.

  • After loaded phase, there are two possible ways. Either application will enter in “ready to run” phase or will “shutdown”. In case of shutdown kindlet will not notified.

Ready to run

In case application are eligible for “ready to run” then a transition is occur via method called create() declaired in Kindlet interface. At this stage application gain access to kindle environment and we have a reference of KindletContext object. This object represents the Kindle application’s environment for a Kindlet and provides access to the Kindlet’s user interface, filesystem space, network connectivity and more.

Once a Kindlet create method has finished, the Kindlet is considered “ready to run”. The application’s user interface is not visible while in the “ready to run” state and no user input will be received. be patient

The next phase from “ready to run” is to “running”. During this start() method of kindlet interface will be called. Even at this point, the user interface is still not visible.

“ready to run” to “shutdown” is also possible. If this occurs, destroy will be called. During destroy, the application should release any resources it has allocated.

Running Phase

The end of start() method moves the application in running state. At this point user interface become visible and application is said to be running state. User  can start using application.

  • Note: one thing  need to know. When user plug usb cable to device,  then  the device goes to screen saver and its stop() method calls for current running application. You can’t use device when its plug with usb cable. The stop() method should pause any executing work, release any file or network resources, and prepare for the user interface to be made invisible. At this stage application move to “ready to run” state again.

Shutdown State

When use wants to quit the application, the application moves to shutdown state and stop () method is called. This pause any executing work, release any file or network resources, and prepare for the user interface to be made invisible.

That’s was a theoretical concepts for life cycle of a kindle application. Let have a quick glance over life cycle methods of kindlet.


is the first step in the life cycle. A reference to the application’s environment is provided to this method. This method will only be called once during the life of the Kindlet instance.


indicates that the application is about to become active. Upon completion of the start method, the user interface will become visible and the application will start to receive events from the user. Unlike create, start may be called many times during the overall life of the Kindlet instance. For instance, entering and exiting the screensaver results in a stop event followed by a start event. Similar cases exist for USB and other system notifications.


indicates that the application should stop. The user interface will become invisible shortly after this method completes. When the user interface becomes invisible any open option panes will be closed. Stop will be called on a running application when the Kindle enters USB mode, screensaver or exits the application.

When an application is stopped, the file system may disappear. It is important for applications to close resources like files and re-open them on stop / start cycles, respectively. Additionally, any threads that are performing work should either shutdown or sleep. This includes network access, and all requests for connectivity may be cancelled on stop.


indicates that the Kindlet instance will not be used again. This permits the Kindlet to clean up resources and do any housekeeping that may be necessary on application exit.

The device may choose to shutdown an application during screen saver or USB mode to preserve battery life.

Its enough for today .. in next part, we will move to actual development, a hello world program. though i start working that part today but i felt we should discuss these things first so that while writing the code, we should know what actually going inside code and at backend of our application.

feel free to ask any thing confusing here. i will try my best to make it more simple, easy to understand as per your kind suggestions.

Be blessed. Have a nice day.

free counters


Amazon Kindle Application Development Tutorial – Part 2

Posted on Updated on

Setting up your system for Amazon kindle


Hope everyone is good and enjoying life.

Today is Sunday, i just get done with weekly cleanup of my room, reset my bookshelf, brought some useless things/papers out from drawer etc. I’m lil tired too. Now get free to have some talk to you.

Note : This is the 2nd part of my series of tutorial on Amazon Kindle Application Development. So far we have discussed following topics in this category.

Today i will describe how to set development environment for Amazon Kindle application. It pretty simple. If you are already a java developer then you have done much already. In my last post i gave you an overview of kindle platform. Today you will learn how to install basic tools to start development.

Bring your coffee/tea with some snacks, play some good slow track at background  and lets start.

Follow the step given below to install required tools for kindle development. As java developer, you can skip some of them.

Download JDK
For those who are already doing java development skip this step, for those who are new to java, they must download and install java development kit (JKD). Currently version 6 is latest so you must use it. Download JDK.

Install JDK
After downloading JDK install it to your prefer location, then edit a “path” environment variable entry (right click My computer->properties->Advance tab and then click environment variable at bottom), append the [jdk-instal-dir]\bin … like in my case, I appended the entry c:\Program Files\Java\jdk1.5.0_06\bin in path variable after placing semi-colon in the previous entry.

Download eclipse
Next, we will use eclipse IDE for our development and debugging. As eclipse is free with many useful Plug-in available. Download eclipse.
After download, run eclipse. It will ask you the location of workspace. A workspace is a location where all your projects will be saved by default. You can choose the custom location for your projects too. When eclipse will start, you will see welcome page of your workspace.

Configure jdk with eclipse
its time to link your jdk with eclipse so that while compiling and building your projects

  • Click Window > Preferences from the main menu in Eclipse
  • Click Java > Installed JREs
  • Click Add.
  • Fill the fields:
    • JRE type = Standard VM
    • JRE name = jdk1.6 [or any other name of your choice]
    • JRE home = path to the JDK (eg. C:\jdk1.6.0_06)
    • Default VM Arguments leave blank

At this point you are ready to start your java development.

Download Kindle Development Kit
Amazon made its Kindle Development Kit (KDK) available for download to software developers. But before download you’ve got to register and be approved by Amazon to download the Kit. You can apply here. The KDK is currently in a limited Beta phase.
After getting approval you will be sent a link to download kdk. Its ~13MB zip archive file name KDKv1.

Kdk comes with kindle application libraries, sample applications and kindle simulator. You can test your application over simulator before submitting to your client or kindle store.

Thats all for today. At this moment you are ready to start application development for kindle platform. In next tutorial you will learn basic constitue of kindle application, how to make hello world project and running your project on simulator.

In case of any query, confusion or you feel i missed something important, feel free to comment.

Have a blessed day.

error in displaying visitors. please retry.

Amazon Kindle Application Development Tutorial – Part 1

Posted on Updated on

Hello All.

hope everything is good.

Amazon Kindle i used in my development.

From last few weeks i’m working on an application development of Amazon Kindle, an ebook reading device by Amazon. In my last post i introduce to you kindle device. Now its sdk is also available for custom applications. I’m probably the first in my region who is working on kindle. So as per my bad habit, i’m going to share what i have learned so far. So from today i’ll post 2, 3 tutorials covering basic concepts regarding application development on kindle platform.

Note : This tutorial is a part of my series of tutorial on Amazon Kindle Application Development. So far we have discussed following topics in this category.

As its mid night, i will try to be concise and will focus mainly on key points. But i assure you as developer you will quickly get what you EXACTLY need to know… more details i will post in next tutorial. So as a tradition of my blog, have a cup of tea/coffee, sit relax in chair and for few min just forget everything around you. Read the rest of the post and get what you actually want to learn; in a simple  and quick way.

i’m going to explain some very basic concepts first. then in later post will move to actual development process.

Orite lets go .. few general things need to know in start

  • Kindle was basically an ebook reading device by Amazon. You can download books from Amazon, subscribes to blogs and can read contents on your kindle device.
  • Kindle as application is also available for iPhone. You can install that app from AppStore and can use same features provided by standard kindle device.
  • Then Amazon launched beta sdk for kindle platform; let the developer community to develop application for kindle device. Many application has been developed including games, productive apps etc. The kindle kdk team is continuously intouch with all developers and taking their platform to much more mature state by having feedback/suggestions.
  • In this series of tutorial, we will learn how to develop application for kindle platform using kindle skd. We will test them over its simulator and then run over device.

Orite now something related development perspective.

  • First of all, congratulations, kindle development is java based so thumbs up , take a relax breath and have little smile .. yesss that’s the way  🙂 …  (don’t forget to take sip of tea/coffee)
  • As there is java development, me like many other developer community suggests you should use eclipse IDE for your development. Eclipse no doubt the best tool currently available. Here I’m not going to tell which features it provides else I need few years to tell everything in details. As we have already used eclipse for our Android and blackberry application development, so again I will prefer to use eclipse.
  • The kindle sdk provides a simulator for testing your application. Though you can fully test your creativity over there but as a matter of fact you MUST need to run it over kindle device before submitting to your client or to launch publically. I used kindle that was cost nearly $150 (though it wasn’t mine at all)  so if you wish you can have your own kindle else test it over simulator 🙂

Thats all from today’s lecture. In the next part I will describe how to set development environment on your system to start applications for kindle.

have good time.
free counters

Amazon Kindle …

Posted on Updated on

The Kindle is an electronic device for downloading, storing, and reading electronic books, known as e-books. It was developed by a company called Lab 126 which is a subsidiary of Amazon. The Kindle has instant wireless access to and their huge number of e-books (over 115,000 and growing). You can read newspapers, subscribe to magazines and blogs, and even play audio files such as MP3’s or audio books. The Kindle is compact and lightweight so it is easy to handle. Just think of it as a conveniently portable television for your books.

The Kindle uses a grey screen to display a page of text. To turn the page, you just press a button to go forward or backward. It can download compatible files over Amazon’s Whispernet directly to the Kindle by using the same network as Sprint EVDO. You don’t even need a computer to download and then transfer files like you do some MP3 players and other electronics. It also includes a web browser but you are limited to only Amazon or Wikipedia. You can add and read e-books from other sites, too, as long as they are compatible. So you can download stuff fromMobipocket or even in plain text. Amazon offers an email service that can convert files from HTML, jpeg, bmp, PDF, and others into the Kindle format. There is enough internal memory in the Kindle to be able to store around 200 e-books but you can get an SD memory card if you want to add more memory.

Although the wireless service is free, you have to buy the e-books in order to download them. For instance, a book on the latest New York Times bestsellers list can be purchased for $10. Other titles will cost you around $1.99, which is significantly cheaper than a printed book, even in paperback. Books that are public domain can be downloaded for free.

The Newest Kindle DX has

  • All New, High Contrast E-Ink Screen: graphite Kindle DX uses our all new, improved electronic ink display, with 50% better contrast for the clearest text and sharpest images
  • Beautiful Large Display: The 9.7″ diagonal E-ink screen is ideal for a broad range of reading material, including graphic-rich books, PDFs, newspapers, magazines, and blogs
  • Read in Sunlight with No Glare: Unlike backlit computer or LCD screens, Kindle DX’s display looks and reads like real paper, with no glare. Read as easily in bright sunlight as in your living room
  • Slim: Just over 1/3 of an inch, as thin as most magazines
  • Books In Under 60 Seconds: Get books delivered wirelessly in less than 60 seconds; no PC required
  • Free 3G Wireless: No monthly payments, no annual contracts. Download books anywhere, anytime
  • Long Battery Life: Read for up to 1 week on a single charge with wireless on. Turn wireless off and read for two to three weeks.
  • Carry Your Library: Holds up to 3,500 books, periodicals, and documents
  • Buy Once, Read Everywhere: Kindle books can be read on all your devices. Our Whispersync technology saves and synchronizes your Kindle library and last page read across your Kindle(s), PC, iPhone, Mac, iPad, Android device, and BlackBerry device
  • Share Meaningful Passages: Share your passion for reading with friends and family by posting meaningful passages to Twitter and Facebook directly from your Kindle
  • Global Coverage: Enjoy wireless coverage at home or abroad in over 100 countries. See details. Check wireless coverage map.
  • Built-In PDF Reader: Carry and read all of your personal and professional documents on the go. Now with Zoom capability to easily view small print and detailed tables or graphics
  • Auto-Rotating Screen: Display auto-rotates from portrait to landscape as you turn the device so you can view full-width maps, graphs, tables, and Web pages
  • Read-to-Me: With the text-to-speech feature, Kindle DX can read newspapers, magazines, blogs, and books out loud to you, unless the book’s rights holder made the feature unavailable
  • Large Selection: Over 670,000 books and the largest selection of the most popular books people want to read, including 109 of 112 New York Times® Best Sellers, plus U.S. and international newspapers, magazines, and blogs. For non-U.S. customers, content availability and pricing will vary.
  • Out-of-Copyright, Pre-1923 Books: Over 1.8 million free, out-of-copyright, pre-1923 books are available to read on Kindle, including titles such as The Adventures of Sherlock Holmes, Pride and Prejudice, and Treasure Island.
  • Low Book Prices: New York Times Best Sellers and New Releases from $9.99.
  • Free Book Samples: Download and read first chapters for free before you decide to buy.


Kindle History

  • Amazon released the Kindle First Generation on November 19, 2007, for US$399 and it sold out in five and a half hours. The device remained out of stock for five months until late April 2008.
  • On February 10, 2009, Amazon announced the Kindle 2. It became available for purchase on February 23, 2009. The Kindle 2 features, a text-to-speech option to read the text aloud, and 2 GB of internal memory of which 1.4 GB is user-accessible. Amazon estimates that the Kindle 2 will hold about 1500 non-illustrated books. Unlike the Kindle First Generation, Kindle 2 does not have a slot for SD memory cards, was slimmer than the original Kindle.
  • On October 7, 2009, Amazon announced an international version of the Kindle 2 that works in over 100 countries. It became available October 19, 2009. The international Kindle 2 is physically very similar to the U.S.-only model, although it uses a different mobile network standard.
  • Since January 19, 2010, the Kindle DX International ships in 100 countries. The Kindle DX comes with a 9-inch E Ink screen instead of the 6 inch normal Kindle screen
  • On July 1, 2010, Amazon released a new revision of the Kindle DX (3rd Generation Kindle DX). As well as dropping the price from $489 to $379, the new Kindle DX has an e-ink screen with 50% better contrast ratio and comes only in a “graphite” color. It is speculated the color change is to improve contrast ratio perception even further, as some users found the previous white casing highlighted the fact that the e-ink background is gray and not white.
Image of Kindle DX
Kindle DX
Image of 6 inch Kindle 3
Kindle (Latest Generation)
Image of 6 inch Kindle 2
Kindle (2nd Generation)
Image of first generation Kindle
Kindle (1st Generation)

free counters