MIDP Mobile Information Device Profile Johnny Yau CIS 642 Prof. Insup Lee.

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

J2ME Melih Sakarya Java Teknolojileri Derneği. JVM JAVA Kullanılan yerler  Windows-Linux-Unix-Solaris  PDA lar  Smart Cardlar  Cep Telefonları  Appletler.
Java 2D Training. Basic Tools Java SDK 1.4x Wireless Toolkit 2.x NetBeans IDE + mobility pack Global Code editor Text Comparer Tools Graphics Editor Sprite.
1 Mobile Software Development Framework: TinyOS, J2ME 10/2/2012 Y. Richard Yang.
Pengantar Teknologi Mobile 12
Introduction of J2ME Mobile solutions. Overview What is J2ME. How does J2ME work? Java J2ME Carriers and Products. The Two Configuration of J2ME. Profiles.
J2ME 25 July Overview  What is J2ME?  The CLDC and CDC configurations  MIDP and MIDlets  Development Tools  Demonstrations.
Writing Your First MIDlet Running JAVA on a Cell Phone Jon A. Batcheller January 27, 2004.
UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01.
Introduction to Java 2 Micro Edition Mark Balbes, Ph.D. Senior Software Engineer Jeff Brown Senior Software Engineer.
Architecture of Mobile eLearning Services Ivan Minov, Stanimir Stoyanov.
Quality Assurance and Testing of J2ME Programs for Mobiles Phones.
Developing an Application with J2ME Technology Scott Palmer, Nat Panchee, Judy Sullivan, Karen Thabet, Sten Westgard.
J2ME RMI 1 Java 2 Platform, Micro Edition Implementation of J2ME RMI Application Farooq Sheikh.
© 2009 Research In Motion Limited Advanced Java Application Development for the BlackBerry Smartphone Trainer name Date.
J2ME for Palm Speaker: Chen-Nien Tsai Adviser: Kai-Wei Ke.
Developing Software for Wireless Devices
J2ME Prepared by: - Gaery- Ronny - Alan- Andy. Why Technology for Mobile Devices? The nature of wireless devices is changing Old devices: All the software.
PDA Programming Using J2ME Presenter :涂俊凱 Date : 2003/4/8.
Making Cell Phone Games An Overview Ray Ratelis Guild Software, Inc.
V0.01 © 2009 Research In Motion Limited Understanding Java APIs for Mobile Devices Trainer name Date.
Developing J2ME Applications Mobile and Wireless Networks.
The 21th century Repairman Agenda Introduction J2EE J2ME Demonstration.
Cosc 4730 Phone Programming in Java An Introduction.
Java 2 Micro Edition Mano Chen Senior Technical Consultant
Java Platform, Micro Edition (J2ME)
CS884 (Prasad)Java Goals1 “Perfect Quote” You know you've achieved perfection in design, Not when you have nothing more to add, But when you have nothing.
Java 2 Platform, Micro Edition (J2ME) By Xiaorong Wang.
J2ME and WAP Technologies CSCI – Independent Study Fall 2002 Presented by: Kashif Syed.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
Android Introduction Platform Overview.
J2ME Java for Mobile Environments Based on J2ME In A Nutshell, by Kim Topley, O’Reilly & Associates Inc., 2002, and Tetris by Alexei Patinov.
An Introduction to the Java ME Project Jens A Andersson.
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
Java Security. Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security Manager.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 12 Using the KToolbar Rob Pooley
Platforms and tools for Web Services and Mobile Applications J2ME based Applications Bent Thomsen Aalborg University 3rd and 4th of June 2004.
Michael Brockway Advanced Applications Development in Java J2ME -- Introduction l Introduction / Overview l Java 2 Micro Edition n CLDC n MIDP l Examples.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 11 J2ME and MIDlets Rob Pooley
Mobile Applications with Java ME & BlackBerry. Overview Java ME –Networking –Databases Java ME and the BlackBerry –The BlackBerry wireless device –Converting.
Framework and application bytecode size CLDC MIDP kXML parser Utility classes Graphics Logic (MIDlet) Application Data (XML file)
Computer Science Wi-Fi App using J2ME and MVC Architecture Advisor : Dr. Chung-E Wang Department of Computer Science Sacramento State University Date:
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
J2ME Presented by May Sayed & Menna Hawash. Outline Introduction “Java Technology” Introduction “What is J2ME?” J2ME Architecture J2ME Core Concepts 
Java 2 Micro Edition (J2ME) and the world of java
PROG Mobile Java Application Development PROG Mobile Java Application Development BlackBerry App Lifecycle Java ME API.
1Basics of J2ME. 2 Objectives –Understand the different java API’s and how the mobile edition API’s fit in –Understand what a mobile configuration and.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 12 lcdui Rob Pooley
Spong Bluetooth game Developed by: Erik Matzols Fredrik Lindberg.
Martin Schmidt / The Silent Revolution Mobile Java.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 13 lcdui and OXO Rob Pooley
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 14 Various MIDlet examples Rob Pooley
CSC 205 – Java Programming II Applet. Types of Java Programs Applets Applications Console applications Graphics applications Applications are stand-alone.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Java 2 Platform, Micro Edition (J2ME)
1 Introduction to J2ME Outline MIDP Building J2ME Apps- Tool J2ME Wireless Toolkit Demo MIDlet Programming -- MIDlet Transition States -- Midlet Skeleton.
Mobile Programming Mobile Programming - Ordibehesht Ordibehesht 1390.
Enhanced mobile services in Java enabled phones Björn Hjelt Sonera zed ltd Supervisor: Professor Jorma Jormakka.
Advance Computer Programming Market for Java ME The Java ME Platform – Java 2 Micro Edition (J2ME) combines a resource- constrained JVM and a set of Java.
The Java Platform Micro Edition Java ME
Object Oriented Programming in
Java N Amanquah.
MOBILE DEVICE OPERATING SYSTEM
Wireless Instant Messaging Using J2ME
Introduction Enosis Learning.
By Jeff Heaton An Overview of J2ME By Jeff Heaton
Introduction Enosis Learning.
Introduction CSC 111.
Java for Mobile Devices
Presentation transcript:

MIDP Mobile Information Device Profile Johnny Yau CIS 642 Prof. Insup Lee

Introduction MIDP = Mobile Information Device Profile Spearheaded by Sun, Motorola, and Nokia Latest attempt by Sun to bring JAVA into embedded systems, specifically mobile phone

Motivation Behind MIDP Heterogeneous development platforms in mobile phone arena Short product life cycles MIDP attempts to solve that via offering a standard environment for application programmers

What is MIDP? Set of JAVA APIs Implements a MIDlet class Addresses issues such as user interface, persistent storage, networking, and application model Targeted towards mobile phones Basically JAVA for mobile phones

Implementation Stacked on top of Connected Limited Device Configuration (CLDC) and KVM

Implementation (cont) Operates over existing network protocols such as IrDA, Bluetooth, IEEE , and wireless networks Specifications are targeted towards mobile phones Other devices such as PDAs may find more use in a super set of the MIDP APIs

Service Model

Retrieval Medium Verification Figure out which communication device to use (e.g. Bluetooth or IEEE ) Negotiations

Server and mobile device exchange information about the MIDlet and mobile device, respectively Information such as device capabilities (e.g. processing power, volatile memory available), device size, MIDlet requirements may be exchanged

Negotiations (cont) Crux of the useful capabilities offered by MIDP Especially important when it comes to making things work over devices with different sized screens and different capabilities

Installation Download Security Verification Check that the MIDlet does not violate security issues Transformation Convert public representation to internal representation

Launch When selected by user application is moved into KVM and run

Upgrade & Removal Applications can be upgraded when new versions become available An application permanently stored locally on device can be removed from persistent storage when selected for removal by user

Provided by Mobile Device Classes and native code that implements CLDC JAVA Virtual Machine (KVM) Native code for the MIDP

Provided by JVM & CLDC Multi-threading Locking Synchronization Execution of byte code Method dispatching

MIDlet Class All MIDP applications MUST inherit from the MIDlet class Does not have a main() function Cannot call System.exit() It triggers a SecurityException to be thrown

JAVA Packages java.lang.* java.io.* java.util.* javax.microedition.io.* javax.microedition.ui.* javax.microedition.rms.* javax.microedition.midlet.*

javax.microedition.io StreamConnection To open a basic connection that reads/writes simple data. ContentConnection To open a connection that provides content length, type, and encoding information. This interface extends from the StreamConnection interface.

javax.microedition.io HttpConnection To open a connection that provides capabilities to interface through HTTP including getting/setting headers and HTTP-specific handling. This interface extends from the ContentConnection interface.

javax.microedition.ui Offers two major choices in interface design Canvas Used to construct a custom interface using the Graphics object Mainly used for multithreaded games or non-traditional interfaces

javax.microedition.ui Screen For the construction of form based user interfaces

javax.microedition.rms Contains the classes needed to implement a temporary storage database on the device Limited in capabilities because of the restrictions imposed by mobile phones

javax.microedition.midlet MIDlet Used to build MIDP applications

Hello World MIDlet import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class HelloMidlet extends MIDlet implements CommandListener { // Initialize the Midlet Display variable private Display midletDisplay; // Initialize a variable for the doneCommand private Command doneCommand; public HelloMidlet() { // Retrieve the display from the static display object midletDisplay = Display.getDisplay(this); // Initialize the doneCommand doneCommand = new Command("DONE", Command.SCREEN, 1); }

/** * Create the Hello Midlet World TextBox and associate * the exit command and listener. */ public void startApp() { // Create the TextBox containing the "Hello Midlet World!!" message TextBox textBox = new TextBox("Hello Midlet", "Hello Midlet World!!", 256, 0); // Add the done Command to the TextBox textBox.addCommand(doneCommand); // Set the command listener for the textbox to the current midlet textBox.setCommandListener( (CommandListener) this); // Set the current display of the midlet to the textBox screen midletDisplay.setCurrent(textBox); } /** * PauseApp is used to suspend background activities and release * resources on the device when the midlet is not active. */ public void pauseApp() { }

/** * DestroyApp is used to stop background activities and release * resources on the device when the midlet is at the end of its * life cycle. */ public void destroyApp(boolean unconditional) { } /* * The commandAction method is implemented by this midlet to * satisfy the CommandListener interface and handle the done action. */ public void commandAction(Command command, Displayable screen) { // If the command is the doneCommand if (command == doneCommand) { // Call the destroyApp method destroyApp(false); // Notify the midlet platform that the midlet has completed notifyDestroyed(); } } }

Screenshot

Development Cycle Write application using MIDP APIs Compile Pre-verify Pre-processes the class for use in KVM Test Package classes into a.jar file Test with Package

Hits Simpler development Runs on acceptably well on heterogeneous platforms

Misses Too bloated really for mobile phones Not powerful enough for devices like PDAs and Wireless Internet Appliances that have more resources available Though a superset of the APIs may work fine