MCQs Test!! VB Basic Test !! Essentials of VB !! Creating User Services !! function !! Anatomy !! GK March-2019 !! DATA TYPES IN JAVA !! Classes ,Constructor ,Methods,Inheritance !! Ecology-I !! Biology 2019 !! Gk april 2019 !! Biology (living world) !! Plant anatomy !! CELL STRUCTURES AND FUNCTION !! General biology !! Human physiology !! Data structure !! Ecology-II !! GK TEST !! Reproduction in plants !! Human reproduction !! The ABC of C !! Operating system set1 !! Operating system set2 !! Gk and current affairs !! Animal kingdom !! Number system !! Animal kingdom-II !! Gk TEST-III !! Number series !! Microorganisms !! Interview question in c !! Time and Work !! Percentage !! General history !! Average !! Cells !! Locomotion and Movement !! paging !! Bacteriology !! Page replacement policy !! Secondary memory and Disk scheduling !! Introduction of Nervous System and neurons !! Plant harmones !! Transport and Mineral Nutrition in Plants !! Neurotransmitters !! Modern Indian History !! Photosynthesis in Plants !! Modern Indian History-II !! Plant respiration !! Environment & Biodiversity !! Environment & Biodiversity - II !! Algae, Bryophytes, Pteridophytes !! Area !! Cricket !! Days of the Year (India and the World) !! Plant Pathology - I !! Indian Transport System !! Plant Pathology - II !! Aptitude !! Biology !! Botany !! C language !! Computer Science !! Core Java !! Gate !! GK !! Mysql !! Operating system !! Physics !! VB-Visual Basic !! Zoology

Java Programing laungage

J2ME Projects

J2ME Project 1

MIDlet Life Cycle
Previous Home Next

A MIDlet is a MID Profile and application must extend MIDlet for implement three main abstract methods and methods functionality in it, Methods are :

  1. startApp();
  2. pauseApp();
  3. destroyApp();

A MIDlet application is represented by the instance of the javax.microedition.midlet.MIDlet class. MIDlet have very specific lifecycle which is reflect in the methods and behavior of the MIDlet class. The application must extend this class to allow the application management (a piece of device- specific software) to controls the installation, execution, life cycle of MIDlet and to be able to retrieve properties from the application descriptor and notify and request state changes. The class files will be packaged in a Java Archive (JAR), while an accompanying descriptor file (with a .jad extension) describes the contents of the JAR.


Stages of MIDlet's lifecycle:

  1. When the MIDlet is about to be run, an instance of javax.microedition.midlet.MIDlet class is create. The MIDlet's class constructor is run, and the MIDlet is in the Paused state.
  2. Next, MIDlet move into Active state after application manager calling startApp() method which implement with extend MIDlet class.
  3. While the MIDlet is Active state, the application manager can suspend its execution by calling pauseApp() method. This will puts MIDlet back into Paused State.
  4. The MIDlet also place itself into Paused state by calling calling notifyPaused() mehod.
  5. The application manager puts MIDlet form Paused state to Active state by calling startApp() Method.
  6. One addition method resumeRequest() method calling by application manger to put MIDlet into Active state from Paused state.
  7. After application manager execute startApp() method, can terminate the execution by calling destroyApp() method. At that point the MIDlet is destroyed and patiently awaits garbage collection.
  8. A MIDlet can destroy itself by calling notifyDestroyed() method.
Previous Home Next