DAY 3 J2ME March 2007 Aalborg University, Mobile Device Group Mobile Phone Programming

Similar documents
DAY 3 J2ME Aalborg University, Mobile Device Group. Mobile. Mobile Phone Programming

Mobile Application Development. Introduction. Dr. Christelle Scharff Pace University, USA

Who am I? Wireless Online Game Development for Mobile Device. What games can you make after this course? Are you take the right course?

JAVA. Java Micro Edition

Developing Mobile Applications

Minne menet, Mobiili-Java?

J2ME crash course. Harald Holone

Overview of Java 2 Platform, Micro Edition (J2ME )

J2ME ARCHITECTURE AND RELATED EMBEDDED TECHNOLOGIES

Acknowledgments Introduction p. 1 The Wireless Internet Revolution p. 1 Why Java Technology for Wireless Devices? p. 2 A Bit of History p.

Mobile Information Device Profile (MIDP) Alessandro Cogliati. Helsinki University of Technology Telecommunications Software and Multimedia Laboratory

BVRIT HYDERABAD College of Engineering for Women Department of Information Technology. Hand Out

CS434/534: Topics in Networked (Networking) Systems

Developing mobile UI

Mensch-Maschine-Interaktion 2

Software Development & Education Center. Java Platform, Micro Edition. (Mobile Java)

Chapter 13 Add Multimedia to Your MIDlets

JSR 248: Taking Java Platform, Micro Edition (Java ME) to the Next Level

Project Overview. Readings and References. Initial project motivation. Opportunity. References. CSE 403, Winter 2003 Software Engineering

CM0256 Pervasive Computing

Programming Wireless Devices with the Java 2 Platform, Micro Edition

Accessing DB2 Everyplace using J2ME devices, part 1

Mobile Station Execution Environment (MExE( MExE) Developing web applications for PDAs and Cellphones. WAP (Wireless Application Protocol)

Requirements and Issues of V**s for Mobile Terminals

JXTA for J2ME Extending the Reach of Wireless With JXTA Technology

Project Overview. CSE 403, Spring 2003 Software Engineering.

Project Overview. Readings and References. Opportunity. Initial project motivation. References. CSE 403, Spring 2003 Software Engineering

PennBench: A Benchmark Suite for Embedded Java

TAMZ. JavaME. MIDlets. Department of Computer Science VŠB-Technical University of Ostrava

Mobile Java: A New Opportunity for Data Services (Executive Summary) Executive Summary

NOKIA 12 GSM MODULE JAVA TM IMLET PROGRAMMING GUIDE. Copyright Nokia. All rights reserved. Issue

All about the new SCMAD Certification Exam

Praktikum Mobile Productivity

JUGAT meeting. Roman Waitz Development. MATERNA Information & Communications

MMAPI (Mobile Media API) Multimedia Framework for Mobile Devices

Application Development using J2ME Architecture for Device Independence

Copyright 2004 by Vincent Claes, Heusden-Zolder, Belgium

Wireless Services in Faculty Information System

Wireless Java Technology

ST.MARTIN'S ENGINEERING COLLEGE Dhulapally,Secunderabad-014

Application Development Using J2ME. Evaluation of Intrinsic Platform Limitations

phoneme: High-performance, product-quality GPLv2 CDC + CLDC stacks Terrence Barr

Java Community Process Program: State of the Community State of the Community December 2003

Building a Java ME Test Suite in 15 Minutes

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

SUN. Sun Certified Mobile Application Developer for the Java 2 Platform, Micro Edition, Version 1.0

Sortware Comprehension and Μaintenance

Java Technology-Based VAS in China Mobile: Today and Tomorrow

Device Technologies I J2ME & WinCE

Portability and Design Issues in Developing a Mobile Phone Quiz Application Quiz Pro 2006

Bluetooth Scatternet Application. Sun Code for Freedom

DoD Mobile Client- A Comparison between J2ME and Symbian Platforms

Java 2 Micro Edition JavaCommnity.Org. (

JavaME TAMZ. Department of Computer Science VŠB-Technical University of Ostrava

Improved Mechanism for Efficient object Pooling in J2ME Based Mobile Phone

مريم سعد جعفر رانيا عبد السجاد علي سامي سمادير عبد العباس ياسمين عبد االمير

Wireless service developing for ubiquitous computing environments using J2ME technologies

Java Smart Ticket Demo Application Scrutinized

MobileFinance (MF)-- A Component Based Approach to Financial Services

Dynabook Vision. Mobile User Interfaces. Chapter 3: Mobile HCI Vorlesung Advanced Topics in HCI (Mensch-Maschine-Interaktion 2)

BUILDING DISTRIBUTED HETEROGENEOUS SMART PHONE JAVA APPLICATIONS AN EVALUATION FROM A DEVELOPMENT PERSPECTIVE

Exam : : Sun Certified Mobile Application Developer for J2ME. v1.0. Title. Version : DEMO

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Master Project. Push To Chat. Realized by. The Quang Nguyen. Supervisor. Professor Jean-Yves Le Boudec (EPFL, LCA) Assistant

Introduction. Enterprise Java Instructor: Please introduce yourself Name Experience in Java Enterprise Edition Goals you hope to achieve

Contents. Mobile Middleware Course. Mobile Platforms Sasu Tarkoma. Challenges. Mobile Platforms WAE. Examples

Mobile application development J2ME U N I T I

Java 2 Platform, Micro Edition

Mobile Messaging Using Bangla

Java 2 Micro Edition Server socket and SMS

Lab Exercise 4. Please follow the instruction in Workshop Note 4 to complete this exercise.

ProvideX On Handhelds


Accurate study guides, High passing rate! Testhorse provides update free of charge in one year!

ACCELERATING 2D GRAPHIC APPLICATIONS WITH LOW ENERGY OVERHEAD

Java ME Developer Guide for MOTOMAGX 1.0. Developer Guide

Developing Games for J2ME Technology- Enabled Mobile Devices

Mobile Devices in Software Engineering. Lab 2

Java 2 Micro Edition

Wireless Java-enabled MIDP devices as peers in Grid infrastructure

Mobile Web Service Discovery in JXTA/JXME

Bringing J2ME Industry Practices into the Undergraduate Classroom (Auburn OK Program)

Distributed Gaming using J2ME. By Rekha Vaddepalli

JAVA ON HANDHELD DEVICES COMPARING J2ME CDC TO JAVA 1.1 AND JAVA 2

3.3.4 Connection Framework

Bluetooth For Java By Bruce Hopkins, Ranjith Antony READ ONLINE

Imperative model of computation

T Multimedia Programming. Different Operating Systems and their Multimedia Support

Java and C Performance Comparison on Palm OS. Zhi-Kai Xin

Mobile Application Design and Development With the use of J2ME Technology & UML m.khlaif Computer Science Dept Garyounis University

Java Card 3 Platform. Peter Allenbach Sun Microsystems, Inc.

Department of Electronic Engineering FINAL YEAR PROJECT REPORT

Project Sens-ation. Research, Technology: AXIS, Web Service, J2ME

Programming Bluetooth-enabled devices using J2ME. Java. in a teacup. 36 April 2006 ACM QUEUE rants:

In order to support developers, there needs to be a number of tools available which may be involved in the ultimate solution.

Mobile Game Programming. Just that facts.

GUIDELINES FOR GAME DEVELOPERS USING NOKIA JAVA MIDP DEVICES Version Nov 02

Core Java Syllabus. Overview

TAMZ. Department of Computer Science VŠB-Technical University of Ostrava

DEVELOPMENT OF WIRELESS EMBEDDED SYSTEMS USING COMPONENT BASED SOFTWARE

Transcription:

DAY 3 J2ME Mobile Phone Programming Module 2 Micro (J2ME) Overview Introduction J2ME architecture Introduction 1

J2ME Key Factors Portability: Write once run anywhere Security: Code runs within the confines of its J Rich set of APIs Very quick learning time Huge number of possible users Market Trends 708 millions mobile Java devices shipped by June 2005 635 mobile Java device models on the market 32 mobile device vendors using Java 45000 mobile Java applications on the market 180 operators worldwide that have developed Java services 23 million mobile Java downloads globally per month in 2005 * Source: Nokia, February 2006 ** Source: Sun Microsystems, March 2005 *** Source: Symbian, February 2006 **** Source: Ovum, June 2005 ***** Source: Informa Telecoms & Media. June 2005 J2ME: Games and...much more At the beginning J2ME was intended as a platform for game developing Now, with the set of APIs provided by J2ME it is possible to easy develop different kinds of applications (enterprise,multimedia-music applications) 2

Java Family Enterprise (J2EE) Standard (J2SE) Micro edition Micro edition Card CDC Java Card CLDC Card Java Virtual Java Machine Virtual Machine Card, Enterprise (J2EE) Multiuser, enterprise-wide applications Based on J2SE + several APIs for server-side computing Java Family DAY 3 J2ME Enterprise (J2EE) Standard (J2SE) Micro edition Micro edition Card CDC Java Card CLDC Card Java Virtual Java Machine Virtual Machine Card, Standard (J2SE) Designed for desktop computers Runs on top of OS:Linux, Windows Java Family DAY 3 J2ME Enterprise (J2EE) Standard (J2SE) Micro edition Micro edition Card CDC Java Card CLDC Card Java Virtual Java Machine Virtual Machine Card, Micro (J2ME) Designed for small capabilities devices that cannot support a full J2SE implementation 3

Java Family DAY 3 J2ME Enterprise (J2EE) Standard (J2SE) Micro edition Micro edition Card CDC Java Card CLDC Card Java Virtual Java Machine Virtual Machine Card Java Card provides a secure environment for applications that run on smart cards and other devices with very limited memory and processing capabilities. J2ME Architecture J2ME Architecture J2ME Optional Packages MIDP Profile CLDC Operating System Mobile Optional Operating Kilo Connected Virtual Information packages: System: Limited Machine: Device Profile: Configuration: is additional J2ME provides a collection works the APIs on most of the different basic top of set APIs the of OS libraries, and of libraries the virtual device and it is compact, portable Java virtual machine offers machine the features core functionality and APIs required for resourceconstrained devices such as user interface, networking by mobile intended for resource-constrained devices applications, support and persistent storage. 4

Kilo Virtual Machine The is a layer of software that runs on top of the host operating system It is implemented in C and it is responsible for the interpretation of the Java byte-code and translating this into native system calls. This makes J2ME programs highly portable between different computing architectures and different types of embedded devices. J2ME Optional Packages MIDP Profile CLDC Connected Limited Device Configuration CLDC provides the lowest common denominator for small and resource-constrained devices characterized as follows: 160 kb to 512 kb of totally memory budget available for the Java platform. a 16-bit or 32-bit processor. low power consumption, often operating with battery power. connectivity to some kind of network, often with a wireless connection and with limited (often 9600 bps or less) bandwidth. There are 2 versions of CLDC: CLDC 1.0 CLDC 1.1 J2ME Optional Packages MIDP Profile CLDC Mobile Information Device Profile MIDP adds an additional layer on the top of the CLDC providing APIs for a specific class of devices: 128KB of non-volatile memory for the MIDP implementation 32KB of volatile memory for the runtime heap 8KB of non-volatile memory for persistent data Input capacity (screen, keyboard, touch) Screen size of at least 96x54 pixels Currently there are two versions of MIDP: MIDP 1.0 MIDP 2.0 J2ME Optional Packages MIDP Profile CLDC 5

Some Optional Packages Information Module Profile (IMP), JSR 195 Wireless Messaging API (WMA); JSR 120, JSR 205 Mobile Media API (MMAPI), JSR 135 Location API for J2ME, JSR 179 SIP API for J2ME, JSR 180 Security and Trust Services API for J2ME, JSR 177 Mobile 3D Graphics, JSR 184 J2ME Web Services APIs (WSA), JSR 172 Bluetooth API, JSR 82 J2ME RMI, JSR 66 JDBC for CDC/Foundation Profile API, JSR 169 J2ME Standard Packages javax.microedition.lcdui: Is the so called User Interface Package containing the classesto create a GUI. javax.microedition.rms: it is used to store data on the phone permanently. javax.microedition.midlet: defines life cycle and interfaces for the MIDlets. javax.microedition.io: is the package in providing Network connectivity. java.io: used to manage the generic I/O data streams java.lang: includes all the classes of the data type: (Boolean, Byte, Character, Integer, Long, Short, String, StringBuffer), basic system and thread classes (Math, Object, Runtime, System, Thread, Throwable). java.util includes all the utility classes from Standard : (Calendar, Date, Hashtable, Random, Stack, Timer, TimerTask, TimeZone, Vector) Java Standardization Process Java architecture and editions are specified by the Java Community Process (JCP) The JCP is an open forum where all interested parties can participate The JCP is guided by the Executive Committee Members of the EC are chosen by election Requests for new functionality in specifications is called a Java Specification Request (JSR) 6

DAY 3 MIDlets J2ME MIDlet MIDP applications are called MIDlets Every application must extend javax.microedition.midlet.midlet class The MIDlet class defines abstract methods that the main class implements (for example: startapp(), destroyapp(), notifydestroyed()). MIDlet Skeleton Example import javax.microedition.midlet.*; public class Example extends MIDlet { public void startapp() { } public void destroyapp(boolean unconditional) { } public void pauseapp() { } } 7

DAY MIDlet 3 J2ME Suite One or more MIDlets are packaged together into a MIDlet suite, composed of: JAR (Java archive) file JAD (Java Application Descriptor) file All the user-defined classes and resources required by the suite's MIDlets must be in the JAR file. MIDlet Suite AMS The Application Management Software (AMS) manages the MIDlets. The AMS is a part of the device's operating environment and guides the MIDlets through their various states during the execution process. 8

MIDlet States AMS invokes MIDlet contructor Paused AMS invokes startapp() AMS invokes pauseapp() Active AMS invokes destroyapp() AMS invokes destroyapp() Destroyed AMS reclaims MIDlet The AMS user calls launches startapp() pauseapp() destroyapp() the to MIDlet: to to change MIDlet into into an a a active paused state destroyed AMS creates statea new instance of the MIDlet class (call constructor) MIDlet is placed in PAUSE state Data Storage: RMS Several applications need to store some data in a permanent way (even when the device is switched off) This kind of data is called persistent data and they are stored in a dedicated memory part called persistent storage MIDP defines a set of classes for storing and retrieving persistent data called Record Management System (RMS). Storage Mechanism The basic storage mechanism used by the RMS is a Record Store A Record Store can be shared among different MIDlets (only MIDP 2.0) When a MIDlet suite is removed from the device then all the record stores associated with it will also be removed 9

Storage Mechanism A Record store is a collection of records: A record is uniquely identified by its Record ID A record is an array of bytes The value of RecordId for the first record created is 1 RecordId for new records will monotonically increase A RecordId is never reused: If a record is deleted from the Record Store, its RecordId will never be assigned to any other record 10