SlideShare a Scribd company logo
1 of 10
Programming Language for Mobile Phone
applications
Introduction to J2ME
J2ME:Programming mobile applications
J2ME architecture consists of layers located above the native
operating system, collectively referred to as the Connected
Limited Device Configuration (CLDC).
The CLDC, which is installed on top of the operating
system, forms the run-time environment for small
computing devices.
J2ME architecture
The J2ME architecture comprises three software layers .
The first layer is the configuration layer that includes the Java
Virtual Machine (JVM), which directly interacts with the native
operating system. The configuration layer also handles
interactions between the profile and the JVM.
The second layer is the profile layer, which consists of the
minimum set of application programming interfaces (APIs) for
the small computing device.
The third layer is the Mobile Information Device Profile
(MIDP).The MIDP layer contains Java APIs for user network
connections, persistence storage, and the user interface. It also
has access to CLDC libraries and MIDP libraries.
MIDlet
 A MIDlet is a J2ME application designed to operate on an MIDP small
computing device.
 A MIDlet is defined with at least a single class that is derived from the javax
.microedition.midlet.MIDlet abstract class.
 Developers commonly bundle related MIDlets into a MIDlet suite,
which is contained within the same package and implemented simultaneously on
a small computing device.
 All MIDlets within a MIDlet suite are considered a group and must be
installed and uninstalled as a group .
 Members of a MIDlet suite share resources of the host environment and
share the same instances of Java classes and run within the same JVM.
 This means if three MIDlets from the same MIDlet suite run the same
class, only one instance of the class is created at a time in the Java Virtual
Machine.
 A key benefit of the relationship among MIDlet suite members is that they
share the same data, including data in persistent storage such as user preferences.
A MIDlet suite is installed, executed, and removed by the
application manager running on the device.
The manufacturer of the small computing device provides the
application manager.
Once a MIDlet suite is installed, each member of the MIDlet
suite is given access to classes of the JVM and CLDC by the
application manager.
Likewise, a MIDlet can access classes defined in the MIDP to
interact with the user interface, network, and persistent storage.
The application manager also makes the Java archive (JAR)
file and the Java application descriptor (JAD) file
available to members of the MIDlet suite.
MIDlet Programming
A MIDlet is a class that extends the MIDlet class and is the
interface between application statements and the run-time
environment, which is controlled by the application
manager.
A MIDlet class must contain three abstract methods that are
called by the application manager to manage the life cycle of
the MIDlet.
These abstract methods are
startApp(),
pauseApp(), and
destroyApp()
The startApp() method is called by the application manager
when the MIDlet is started and contains statements that are
executed each time the application begins execution.
The pauseApp() method is called before the application
manager temporarily stops the MIDlet.
The application manager restarts the MIDlet by recalling the
startApp() method.
The destroyApp() method is called prior to the termination
of the MIDlet by the application manager.
public class BasicMIDletShell extends MIDlet
{
public void startApp()
{
}
public void pauseApp()
{
}
public void destroyApp( boolean unconditional)
{
}
}
 The destroyApp() method has a boolean parameter that is set to true if the
termination of the MIDlet is unconditional, and false if the MIDlet can throw a
MIDletStateChangeException telling the application manager that the
MIDlet does not want to be destroyed just yet.
Event Handling
 AMIDlet is an event-based application. All routines executed in
the MIDlet are invoked in response to an event reported to the
MIDlet by the application manager.
The initial event that occurs is when the MIDlet is started and the
application manager invokes the startApp() method.
A Command object is used to present a user with a selection of
options to choose from when a screen is displayed. Each screen
must have a CommandListener.
The application manager calls methods of a MIDlet. A
CommandListener monitors user events with a screen and causes
the appropriate code to execute based on the current event.
User Interfaces
 A Form is the most commonly invoked user interface element found in a MIDlet and is used
to contain other user interface elements.
 Text is placed on a form as a stringItem, a List, a ChoiceGroup, and a Ticker.
 A StringItem contains text that appears on a form that cannot be changed by the user.  
 The TextBox class and TextField class differ in that the TextBox class is derived
from the Screen class, while the TextField class is derived from the Item class. This
means that an instance of the Form class cannot contain an instance of the TextBox class,
while an instance of a TextField class must be contained within an instance of the Form
class.
  An instance of the TextBox class is created by passing four parameters to the TextBox
class constructor.
 The first parameter is the title of the text box.
 The second parameter is text used to populate the instance.
 The third parameter is the maximum number of characters that can be entered into the instance. Keep
in mind that this parameter is a request and may not be fulfilled by the device. The device determines
the maximum number of characters for an instance of the TextBox class.
 The last parameter is the constraint used to limit the types of characters that can be placed within the
instance. The TextBox class has the same methods as found in the TextField class.

More Related Content

What's hot

Introduction To J2ME(FT - Prasanjit Dey)
Introduction To J2ME(FT - Prasanjit Dey)Introduction To J2ME(FT - Prasanjit Dey)
Introduction To J2ME(FT - Prasanjit Dey)Fafadia Tech
 
Presenting Cloud Computing
Presenting Cloud ComputingPresenting Cloud Computing
Presenting Cloud ComputingNaveen Karn
 
Java2 MicroEdition-J2ME
Java2 MicroEdition-J2MEJava2 MicroEdition-J2ME
Java2 MicroEdition-J2MERohan Chandane
 
Blackberry Development Environment
Blackberry Development EnvironmentBlackberry Development Environment
Blackberry Development EnvironmentPredhin Sapru
 
Introduction to mobile programing (J2ME)
Introduction to mobile programing (J2ME)Introduction to mobile programing (J2ME)
Introduction to mobile programing (J2ME)Wambua Wambua
 
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...Pallepati Vasavi
 
MOBILE APPs DEVELOPMENT PLATFORMS
MOBILE APPs DEVELOPMENT PLATFORMSMOBILE APPs DEVELOPMENT PLATFORMS
MOBILE APPs DEVELOPMENT PLATFORMSSenthil Kanth
 
Introduction to Mobile Application Development
Introduction to Mobile Application DevelopmentIntroduction to Mobile Application Development
Introduction to Mobile Application DevelopmentSenthil Kanth
 
Introduction to Java Micro Edition (ME) 8
Introduction to Java Micro Edition (ME) 8Introduction to Java Micro Edition (ME) 8
Introduction to Java Micro Edition (ME) 8terrencebarr
 
A dynamic application using jboss
A dynamic application using jbossA dynamic application using jboss
A dynamic application using jbossijcax
 
Introduction to java micro edition
Introduction to java micro editionIntroduction to java micro edition
Introduction to java micro editionRaphael Wanjiku
 
Chapter 11:Understanding Client-Side Technologies
Chapter 11:Understanding Client-Side TechnologiesChapter 11:Understanding Client-Side Technologies
Chapter 11:Understanding Client-Side TechnologiesIt Academy
 
01 Symbianosbasics Introducao
01 Symbianosbasics Introducao01 Symbianosbasics Introducao
01 Symbianosbasics IntroducaoTiago Romão
 
A Project Report on Insurance System with Tracking Manager
 A Project Report on Insurance System with Tracking Manager  A Project Report on Insurance System with Tracking Manager
A Project Report on Insurance System with Tracking Manager Sachin Kariyattin
 

What's hot (20)

J2ME
J2MEJ2ME
J2ME
 
Introduction To J2ME(FT - Prasanjit Dey)
Introduction To J2ME(FT - Prasanjit Dey)Introduction To J2ME(FT - Prasanjit Dey)
Introduction To J2ME(FT - Prasanjit Dey)
 
J2me
J2meJ2me
J2me
 
J2ME Unit_01
J2ME Unit_01J2ME Unit_01
J2ME Unit_01
 
Presenting Cloud Computing
Presenting Cloud ComputingPresenting Cloud Computing
Presenting Cloud Computing
 
Java2 MicroEdition-J2ME
Java2 MicroEdition-J2MEJava2 MicroEdition-J2ME
Java2 MicroEdition-J2ME
 
J2ME
J2MEJ2ME
J2ME
 
Blackberry Development Environment
Blackberry Development EnvironmentBlackberry Development Environment
Blackberry Development Environment
 
Introduction to mobile programing (J2ME)
Introduction to mobile programing (J2ME)Introduction to mobile programing (J2ME)
Introduction to mobile programing (J2ME)
 
Mobile application development
Mobile application developmentMobile application development
Mobile application development
 
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
JDBC,Types of JDBC,Resultset, statements,PreparedStatement,CallableStatements...
 
MOBILE APPs DEVELOPMENT PLATFORMS
MOBILE APPs DEVELOPMENT PLATFORMSMOBILE APPs DEVELOPMENT PLATFORMS
MOBILE APPs DEVELOPMENT PLATFORMS
 
Introduction to Mobile Application Development
Introduction to Mobile Application DevelopmentIntroduction to Mobile Application Development
Introduction to Mobile Application Development
 
Introduction to Java Micro Edition (ME) 8
Introduction to Java Micro Edition (ME) 8Introduction to Java Micro Edition (ME) 8
Introduction to Java Micro Edition (ME) 8
 
A dynamic application using jboss
A dynamic application using jbossA dynamic application using jboss
A dynamic application using jboss
 
Introduction to java micro edition
Introduction to java micro editionIntroduction to java micro edition
Introduction to java micro edition
 
Chapter 11:Understanding Client-Side Technologies
Chapter 11:Understanding Client-Side TechnologiesChapter 11:Understanding Client-Side Technologies
Chapter 11:Understanding Client-Side Technologies
 
01 Symbianosbasics Introducao
01 Symbianosbasics Introducao01 Symbianosbasics Introducao
01 Symbianosbasics Introducao
 
A Project Report on Insurance System with Tracking Manager
 A Project Report on Insurance System with Tracking Manager  A Project Report on Insurance System with Tracking Manager
A Project Report on Insurance System with Tracking Manager
 
Mobile Operating System
Mobile Operating SystemMobile Operating System
Mobile Operating System
 

Similar to Introduction to j2me

Repository Pattern in MVC3 Application with Entity Framework
Repository Pattern in MVC3 Application with Entity FrameworkRepository Pattern in MVC3 Application with Entity Framework
Repository Pattern in MVC3 Application with Entity FrameworkAkhil Mittal
 
Interface Programming Android
Interface Programming AndroidInterface Programming Android
Interface Programming AndroidMaksym Davydov
 
Lecture 05. UI programming for Mobile Apps
Lecture 05. UI programming for Mobile AppsLecture 05. UI programming for Mobile Apps
Lecture 05. UI programming for Mobile AppsMaksym Davydov
 
Asp.net+interview+questions+and+answers
Asp.net+interview+questions+and+answersAsp.net+interview+questions+and+answers
Asp.net+interview+questions+and+answersMohan Raj
 
Session 3 J2ME Mobile Information Device Profile(MIDP) API
Session 3 J2ME Mobile Information Device Profile(MIDP)  APISession 3 J2ME Mobile Information Device Profile(MIDP)  API
Session 3 J2ME Mobile Information Device Profile(MIDP) APImuthusvm
 
Mobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdfMobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdfAbdullahMunir32
 
Learning MVC Part 3 Creating MVC Application with EntityFramework
Learning MVC Part 3 Creating MVC Application with EntityFrameworkLearning MVC Part 3 Creating MVC Application with EntityFramework
Learning MVC Part 3 Creating MVC Application with EntityFrameworkAkhil Mittal
 
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISPMCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISPAli Shah
 
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTES
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTESOBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTES
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTESsuthi
 
"MIDP 3.0 Master Class"
"MIDP 3.0 Master Class""MIDP 3.0 Master Class"
"MIDP 3.0 Master Class"paulsu
 
.NET,ASP .NET, Angular Js,LinQ
.NET,ASP .NET, Angular Js,LinQ.NET,ASP .NET, Angular Js,LinQ
.NET,ASP .NET, Angular Js,LinQAvijit Shaw
 
.NET TECHNOLOGIES
.NET TECHNOLOGIES.NET TECHNOLOGIES
.NET TECHNOLOGIESProf Ansari
 
College information management system.doc
College information management system.docCollege information management system.doc
College information management system.docKamal Acharya
 
Resolve dependency of dependencies using Inversion of Control and dependency ...
Resolve dependency of dependencies using Inversion of Control and dependency ...Resolve dependency of dependencies using Inversion of Control and dependency ...
Resolve dependency of dependencies using Inversion of Control and dependency ...Akhil Mittal
 
Distributed Programming using RMI
 Distributed Programming using RMI Distributed Programming using RMI
Distributed Programming using RMIbackdoor
 
Distributed Programming using RMI
Distributed Programming using RMIDistributed Programming using RMI
Distributed Programming using RMIbackdoor
 
Design patterns in Magento
Design patterns in MagentoDesign patterns in Magento
Design patterns in MagentoDivante
 

Similar to Introduction to j2me (20)

Scmad Chapter03
Scmad Chapter03Scmad Chapter03
Scmad Chapter03
 
Repository Pattern in MVC3 Application with Entity Framework
Repository Pattern in MVC3 Application with Entity FrameworkRepository Pattern in MVC3 Application with Entity Framework
Repository Pattern in MVC3 Application with Entity Framework
 
Interface Programming Android
Interface Programming AndroidInterface Programming Android
Interface Programming Android
 
Lecture 05. UI programming for Mobile Apps
Lecture 05. UI programming for Mobile AppsLecture 05. UI programming for Mobile Apps
Lecture 05. UI programming for Mobile Apps
 
Asp.net+interview+questions+and+answers
Asp.net+interview+questions+and+answersAsp.net+interview+questions+and+answers
Asp.net+interview+questions+and+answers
 
Session 3 J2ME Mobile Information Device Profile(MIDP) API
Session 3 J2ME Mobile Information Device Profile(MIDP)  APISession 3 J2ME Mobile Information Device Profile(MIDP)  API
Session 3 J2ME Mobile Information Device Profile(MIDP) API
 
Mobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdfMobile Application Development -Lecture 09 & 10.pdf
Mobile Application Development -Lecture 09 & 10.pdf
 
Android session-5-sajib
Android session-5-sajibAndroid session-5-sajib
Android session-5-sajib
 
Learning MVC Part 3 Creating MVC Application with EntityFramework
Learning MVC Part 3 Creating MVC Application with EntityFrameworkLearning MVC Part 3 Creating MVC Application with EntityFramework
Learning MVC Part 3 Creating MVC Application with EntityFramework
 
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISPMCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
 
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTES
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTESOBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTES
OBJECT ORIENTED PROGRAMMING LANGUAGE - SHORT NOTES
 
"MIDP 3.0 Master Class"
"MIDP 3.0 Master Class""MIDP 3.0 Master Class"
"MIDP 3.0 Master Class"
 
Model viewviewmodel2
Model viewviewmodel2Model viewviewmodel2
Model viewviewmodel2
 
.NET,ASP .NET, Angular Js,LinQ
.NET,ASP .NET, Angular Js,LinQ.NET,ASP .NET, Angular Js,LinQ
.NET,ASP .NET, Angular Js,LinQ
 
.NET TECHNOLOGIES
.NET TECHNOLOGIES.NET TECHNOLOGIES
.NET TECHNOLOGIES
 
College information management system.doc
College information management system.docCollege information management system.doc
College information management system.doc
 
Resolve dependency of dependencies using Inversion of Control and dependency ...
Resolve dependency of dependencies using Inversion of Control and dependency ...Resolve dependency of dependencies using Inversion of Control and dependency ...
Resolve dependency of dependencies using Inversion of Control and dependency ...
 
Distributed Programming using RMI
 Distributed Programming using RMI Distributed Programming using RMI
Distributed Programming using RMI
 
Distributed Programming using RMI
Distributed Programming using RMIDistributed Programming using RMI
Distributed Programming using RMI
 
Design patterns in Magento
Design patterns in MagentoDesign patterns in Magento
Design patterns in Magento
 

Recently uploaded

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Recently uploaded (20)

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

Introduction to j2me

  • 1. Programming Language for Mobile Phone applications Introduction to J2ME
  • 2. J2ME:Programming mobile applications J2ME architecture consists of layers located above the native operating system, collectively referred to as the Connected Limited Device Configuration (CLDC). The CLDC, which is installed on top of the operating system, forms the run-time environment for small computing devices.
  • 3. J2ME architecture The J2ME architecture comprises three software layers . The first layer is the configuration layer that includes the Java Virtual Machine (JVM), which directly interacts with the native operating system. The configuration layer also handles interactions between the profile and the JVM. The second layer is the profile layer, which consists of the minimum set of application programming interfaces (APIs) for the small computing device. The third layer is the Mobile Information Device Profile (MIDP).The MIDP layer contains Java APIs for user network connections, persistence storage, and the user interface. It also has access to CLDC libraries and MIDP libraries.
  • 4. MIDlet  A MIDlet is a J2ME application designed to operate on an MIDP small computing device.  A MIDlet is defined with at least a single class that is derived from the javax .microedition.midlet.MIDlet abstract class.  Developers commonly bundle related MIDlets into a MIDlet suite, which is contained within the same package and implemented simultaneously on a small computing device.  All MIDlets within a MIDlet suite are considered a group and must be installed and uninstalled as a group .  Members of a MIDlet suite share resources of the host environment and share the same instances of Java classes and run within the same JVM.  This means if three MIDlets from the same MIDlet suite run the same class, only one instance of the class is created at a time in the Java Virtual Machine.  A key benefit of the relationship among MIDlet suite members is that they share the same data, including data in persistent storage such as user preferences.
  • 5. A MIDlet suite is installed, executed, and removed by the application manager running on the device. The manufacturer of the small computing device provides the application manager. Once a MIDlet suite is installed, each member of the MIDlet suite is given access to classes of the JVM and CLDC by the application manager. Likewise, a MIDlet can access classes defined in the MIDP to interact with the user interface, network, and persistent storage. The application manager also makes the Java archive (JAR) file and the Java application descriptor (JAD) file available to members of the MIDlet suite.
  • 6. MIDlet Programming A MIDlet is a class that extends the MIDlet class and is the interface between application statements and the run-time environment, which is controlled by the application manager. A MIDlet class must contain three abstract methods that are called by the application manager to manage the life cycle of the MIDlet. These abstract methods are startApp(), pauseApp(), and destroyApp()
  • 7. The startApp() method is called by the application manager when the MIDlet is started and contains statements that are executed each time the application begins execution. The pauseApp() method is called before the application manager temporarily stops the MIDlet. The application manager restarts the MIDlet by recalling the startApp() method. The destroyApp() method is called prior to the termination of the MIDlet by the application manager.
  • 8. public class BasicMIDletShell extends MIDlet { public void startApp() { } public void pauseApp() { } public void destroyApp( boolean unconditional) { } }  The destroyApp() method has a boolean parameter that is set to true if the termination of the MIDlet is unconditional, and false if the MIDlet can throw a MIDletStateChangeException telling the application manager that the MIDlet does not want to be destroyed just yet.
  • 9. Event Handling  AMIDlet is an event-based application. All routines executed in the MIDlet are invoked in response to an event reported to the MIDlet by the application manager. The initial event that occurs is when the MIDlet is started and the application manager invokes the startApp() method. A Command object is used to present a user with a selection of options to choose from when a screen is displayed. Each screen must have a CommandListener. The application manager calls methods of a MIDlet. A CommandListener monitors user events with a screen and causes the appropriate code to execute based on the current event.
  • 10. User Interfaces  A Form is the most commonly invoked user interface element found in a MIDlet and is used to contain other user interface elements.  Text is placed on a form as a stringItem, a List, a ChoiceGroup, and a Ticker.  A StringItem contains text that appears on a form that cannot be changed by the user.    The TextBox class and TextField class differ in that the TextBox class is derived from the Screen class, while the TextField class is derived from the Item class. This means that an instance of the Form class cannot contain an instance of the TextBox class, while an instance of a TextField class must be contained within an instance of the Form class.   An instance of the TextBox class is created by passing four parameters to the TextBox class constructor.  The first parameter is the title of the text box.  The second parameter is text used to populate the instance.  The third parameter is the maximum number of characters that can be entered into the instance. Keep in mind that this parameter is a request and may not be fulfilled by the device. The device determines the maximum number of characters for an instance of the TextBox class.  The last parameter is the constraint used to limit the types of characters that can be placed within the instance. The TextBox class has the same methods as found in the TextField class.