Skip to content
Aasim's Web Corner
Aasim's Web Corner

Ink is better than the best memory.

  • Odysseys & Artistry
    • Saunterer Soul
    • My Poetry
    • My Sketch Work
  • Project Management
    • Agile & Frameworks
    • PMP Certification
  • Digital Diary
    • History
    • Islam
    • Life Around Us
    • My Bookshelf
  • My Tutorials
    • Amazon Kindle
    • Android
    • Aspect Oriented Programming
    • BlackBerry
    • Code Repositories
    • iOS
    • Java
    • JavaScript
    • Linux
    • Random Tips
Connect with me
Aasim's Web Corner

Ink is better than the best memory.

AmazonKindle-AppDevelopmentTutorial-Part3-AasimNaseem.com

Amazon Kindle Application Development Tutorial – Part 3

Aasim Naseem, November 14, 2010 | Read Count: 15,437April 29, 2025
Category: My Tutorials > Amazon Kindle

Kindle Application Lifecycle

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

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

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

  • Amazon Kindle :: An Introduction
  • Amazon Kindle Tutorial – Part 1 :: Basic Concepts
  • Amazon Kindle Tutorial – Part 2 :: Setting up Your System For Amazon Kindle
  • Amazon Kindle Tutorial – Part 3 :: Kindle Application Lifecycle

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

Earlier i was going to start the Hello World tutorial, but I felt these things should be discussed first so that when one starts writing his/her first program, he/she should be clear about what’s going on at the backend. So let start.

I have brought my bowl of “fruit salad,” but my music player is silent today. I’m not in the mood to listen to 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 …

Alright, here we go…

Active Content

First of all, we need to know what “active content” is. Within the community of Kindle developers, you will hear this term time and again. Active content is nothing but the apps that runs over kindle device. Simply the apps for Kindle, here we call them “active conten”t. Simple it is.

Kindlet

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

Loaded

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.

create

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.

start

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.

stop

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.

destroy

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

Author Profile

Aasim Naseem
Hey, Thanks for your interest. I’m a PMP, AWS Solutions Architect, and Scrum Master certified professional with 17+ years of hands-on experience leading projects, building teams, and helping organizations deliver software solutions better, faster, and smarter.

Outside of work, I’ve got a deep curiosity for history — especially ancient civilizations like Egypt. I also enjoy reflecting on the everyday moments that shape how we live and work. This blog is my space to share insights, lessons, and thoughts from both my professional journey and personal interests.

Thanks for reading — and I hope you will find something here that matches your interest.
Latest entries
  • Economic impact of Eid ul Adha - AasimNaseem.comIslamJune 6, 2025 | Read Count: 283Economic impact of Eid-ul-Adha
  • Best PMP Exam Study Resources - AasimNaseem.comPMP CertificationMay 23, 2025 | Read Count: 493Best PMP Study Resources for 2025 (Books, Courses, Tools & More)
  • agile vs scrum - AasimNaseem.comAgile & FrameworksMay 7, 2025 | Read Count: 463Agile vs Scrum: Finally Understanding the Difference
  • When Agile shouldn’t Use - AasimNaseem.comAgile & FrameworksApril 25, 2025 | Read Count: 493When Not To Use Agile: 5 Signs You Need a Different Approach
Amazon Kindle AbstractKindletActive ContentAmazon Kindle Application Development Tutorial – Part 3kdk application tutorialkdk create()kdk destroykdk life cyclekdk loadedkdk on javakdk ready to runkdk runningkdk shutdownkdk startskdk stopKindle Application Lifecyclekindle create()kindle distroykindle lifecyclekindle loadedkindle on javakindle phaseskindle ready to runkindle runningkindle shutdownkindle start()kindle stateskindle stopkindle tutorialKindletKindlet interfaceLifecycle of Kindle application

Post navigation

Previous post
Next post

Related Posts

Amazon Kindle

Kindle For iPhone

October 20, 2010 | Read Count: 15,402April 29, 2025

Category: My Tutorials > Amazon KindleThe Kindle app is optimized for the iPad, iPhone, and iPod touch, giving users the ability to read Kindle books on a beautiful, easy-to-use interface. You’ll have access to over 725,000* books in the Kindle Store, including best sellers and new releases. Amazon Whispersync automatically…

Read More
Amazon Kindle AmazonKindle-AppDevelopmentTutorial-Part1-AasimNaseem.com

Amazon Kindle Application Development Tutorial – Part 1

October 22, 2010 | Read Count: 15,485April 29, 2025

Category: My Tutorials > Amazon KindleHello, all. I hope everything is good. For the last few weeks, I’ve been working on an application for the Amazon Kindle, an ebook reading device by Amazon. In my last post, I introduced to you kindle device. Now its SDK is also available for custom…

Read More
Amazon Kindle AmazonKindle-AasimNaseem.com

Amazon Kindle

September 16, 2010 | Read Count: 15,408April 28, 2025

Category: My Tutorials > Amazon KindleThe 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 Amazon.com and their huge number of e-books…

Read More

Comments (14)

  1. Athar says:
    November 14, 2010 at 2:38 am

    nice and thanks for sharing.

    Reply
  2. Athar says:
    November 14, 2010 at 2:38 am

    BTW, I am not sure what’s the scope for developing app for this platform? is there ?

    Reply
    1. Ans says:
      November 15, 2010 at 11:46 am

      @Athar
      A valid question. Many people has asked the same thing many times. According to them why to spend time (some of them use “waste of time”) on such dull old fashioned device where there isn’t anything to attract users to first buy it and then use different apps … they are correct … kindle seems like a thirty fourty year old invention in first look. No touch no color display (only 16 shades of grey) with eInk surface. In the age of apple’s iPad, samsung glaxy an upcoming dell due; kindle simply looks odd man out. So one must think before spending time to develop app for this platform.
      But there are few good aspects too for kindle …Kindle is backed by Amazon, a big name. Kindle was a best selling item for Amazon in last quarter and it holds a big market share in its domain (.i.e. ebook reading devices). Color e-ink display has also introduced and amazon is working on feasibility of introducing this feature in kindle. Might we have colored kindle after next year or so ..(Hanvon has implemented color display already) plus if we have touch over kindle then think about a device with such great display even in daylight with touch and color … !!! kindle’s future seems very bright to me .. ☺

      Reply
  3. Mayank says:
    November 17, 2010 at 4:32 pm

    Hello,

    I am trying to distribute kindles directly to our customers. We plan to develop applications for them and install them on kindle and then give the kindles to our customers. So, I wanted to know if it is possible to install applications directly on kindle without going the Kindle App Store way? Do we need to get a certification, from Amazon or some other place?

    Thanks,
    Mayank

    Reply
  4. ATHAR says:
    December 14, 2010 at 4:29 am

    well Aasim, its not that bad as you are saying. I can see there are new things comming up here in UK for Kindle 3G so its getting into the market with new features. All I was just saying is to see that what kinda of other application you can develop rather than for reading only.

    Reply
  5. xxxx says:
    December 16, 2010 at 2:02 pm

    This tutorial is useless…

    Reply
  6. leo says:
    March 15, 2011 at 1:33 pm

    Thanks for your nice tutorial.
    By the way,can you send me KDK ?

    My email is: losange@163.com

    Reply
    1. Ans says:
      March 15, 2011 at 1:39 pm

      i can but it will not work for you cuz it has signed with my account and device; you will not able to run/debug for at your end;

      Reply
  7. Matthew Scheer says:
    March 21, 2011 at 5:41 am

    Hi Ans, thanks for the tutorials! I found them to be the best intro to the idk topic on the net. I was hoping you would write a part 4 tutorial on a basic hello world program. Do you still intend to write it or can you recommend other resources on the net where I may get more idk advice?

    Thanks again for your work!

    Matthew scheer

    Reply
  8. boiledwater says:
    May 26, 2011 at 10:12 am

    it`s very very nice post!
    thanks for sharing!
    you said in this post that “Its enough for today .. in next part, we will move to actual development, a hello world program”

    i have not find that post about hello world program.where the post url?
    by the way,your profile picture are very handsome!
    hehe!

    thanks!

    Reply
  9. HotCoffee says:
    July 13, 2011 at 10:49 am

    Would you please make more for us KDK developers that have a singed account?

    Reply
  10. Robert Kimble says:
    August 22, 2011 at 6:54 am

    Hi Ans,
    It’s a nice post. Are you still doing Kindle development ?

    thanks.

    Reply
    1. Ans says:
      August 22, 2011 at 9:49 am

      Thanks for your kind words; Now a days I’m working on iPhone/iPad applications;

      Reply
  11. Manoj Lasantha says:
    July 20, 2013 at 7:50 am

    can you just tell how to configure the KDK with eclipse. i just downloaded the KDK.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Economic impact of Eid-ul-Adha
    Economic impact of Eid-ul-Adha
    June 6, 2025 | Read Count: 283
  • Best PMP Study Resources for 2025 (Books, Courses, Tools & More)
    Best PMP Study Resources for 2025 (Books, Courses, Tools & More)
    May 23, 2025 | Read Count: 493
  • Agile vs Scrum: Finally Understanding the Difference
    Agile vs Scrum: Finally Understanding the Difference
    May 7, 2025 | Read Count: 463
  • When Not To Use Agile: 5 Signs You Need a Different Approach
    When Not To Use Agile: 5 Signs You Need a Different Approach
    April 25, 2025 | Read Count: 493
  • Quran on Peace and Kindness
    Quran on Peace and Kindness
    April 20, 2025 | Read Count: 452

Posts from Past

  • June 2025
  • May 2025
  • April 2025
  • January 2025
  • November 2024
  • April 2024
  • October 2022
  • August 2021
  • September 2020
  • May 2020
  • April 2019
  • January 2019
  • September 2018
  • July 2015
  • June 2015
  • November 2014
  • September 2014
  • April 2014
  • June 2013
  • May 2013
  • February 2013
  • January 2013
  • December 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • March 2012
  • February 2012
  • January 2012
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009

Categories List

  • Agile & Frameworks
  • Amazon Kindle
  • Android
  • Aspect Oriented Programming
  • BlackBerry
  • Blog
  • Code Repositories
  • History
  • iOS
  • Islam
  • Java
  • JavaScript
  • Life Around Us
  • Linux
  • My Bookshelf
  • My Poetry
  • My Sketch Work
  • PMP Certification
  • Random Tips
  • Saunterer Soul

Recent Posts

  • Economic impact of Eid-ul-Adha
  • Best PMP Study Resources for 2025 (Books, Courses, Tools & More)
  • Agile vs Scrum: Finally Understanding the Difference
  • When Not To Use Agile: 5 Signs You Need a Different Approach
  • Quran on Peace and Kindness

Recent Comments

  1. Aasim Naseem on When Not To Use Agile: 5 Signs You Need a Different Approach
  2. Aasim Naseem on When Not To Use Agile: 5 Signs You Need a Different Approach
  3. Masjid Wazir Khan, Lahore Pakistan - Aasim's Web Corner on Everlasting Art of Badshahi Masjid Lahore Pakistan
  4. Rishi Kumar on When Not To Use Agile: 5 Signs You Need a Different Approach
  5. Best PMP Study Resources for 2025 (Books, Courses, Tools & More) - Aasim's Web Corner on PMP Exam Eligibility 2025: 3 Things You Need to Know
©2025 Aasim's Web Corner | WordPress Theme by SuperbThemes