Development of Java ME



Similar documents
Java Platform, Micro Edition (Java ME) Mokoena F.R. The 7046 Team

Mobile application development J2ME U N I T I I

Tutorial: Development of Interactive Applications for Mobile Devices

DESIGNING SHIFT CALENDAR FOR MOBILE PHONE

MIDlet development with J2ME and MIDP

Mobile Operating Systems. Week I

Mobile Software Application Development. Tutorial. Caesar Ogole. April 2006

The Java Virtual Machine and Mobile Devices. John Buford, Ph.D. Oct 2003 Presented to Gordon College CS 311

Java ME & NetBeans Mobility. Petr Suchomel Architect, NetBeans Mobility Sun Microsystems

Introduction to Mobile Phone. Programming in Java Me

Mobile Application Development

Java ME Clients for XML Web Services

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Location-Based Information Systems

Technical Note. Micron Flash Data Integrator (FDI) Support for Java Applications. Introduction. Definition

Nokia 9210i/9290 Communicators and PersonalJava TM Application Development

STM32JAVA. Embedded Java Solutions for STM32

Real time vehicle tracking and driver behaviour monitoring using cellular handset based accelerometer and GPS data

TAMZ I. (Design of Applications for Mobile Devices I) Lecture 1. Introducing Mobile Platforms.

Mobile Application Development Android

Fachbereich Informatik und Elektrotechnik SunSPOT. Ubiquitous Computing. Ubiquitous Computing, Helmut Dispert

CSCI E 98: Managed Environments for the Execution of Programs

Beginning BlackBerry 7

Introduction to BlackBerry Development using Java ME. Presented by: Sean Fenton Technical Channel Manager RIM (Research in Motion )

Mobility Introduction Android. Duration 16 Working days Start Date 1 st Oct 2013

MOBILE APPLICATION DEVELOPMENT

Admin. Mobile Software Development Framework: Android Activity, View/ViewGroup, External Resources. Recap: TinyOS. Recap: J2ME Framework

Mobile-PC Suite: Using Mobile Phone as Remote to Control PC Operations

1 Mobile and Ubiquitous User Interfaces

SavaJe OS: Solving the problem of the Java Virtual Machine on Wireless Devices

An Overview of Java. overview-1

Lecture 1 Introduction to Android

Lecture 3 Mobile App Development (Android, ios, BlackBerry, Windows Mobile) <lecturer, date>

Mobile App Design and Development

Extreme Java G Session 3 Main Theme Java Core Technologies (Part I) Dr. Jean-Claude Franchitti

Android Basics. Xin Yang

J2ME: Step by step. Presented by developerworks, your source for great tutorials ibm.com/developerworks

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

JOURNAL OF OBJECT TECHNOLOGY

Mobile Development Discovery Document

The Software Engineering of Mobile Application Development

CS378 -Mobile Computing. Android Overview and Android Development Environment

Integrating Mobile Devices into the Computer Science Curriculum

Oracle Java Micro Edition Software Development Kit

rich mobile applications made easy

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

ADF. Joe Huang Joe Huang Senior Principal Product Manager, Mobile Development Platform, Oracle Application Development Tools

MIDP 3.0 overview. Copyright 2008 Aplix Corporation. All rights reserved.

Copyright 2014, Oracle and/or its affiliates. All rights reserved.

Crash Course in Java

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

The BSN Hardware and Software Platform: Enabling Easy Development of Body Sensor Network Applications

A Comparison of Mobile Peer-to-peer File-sharing Clients

JavaFX Session Agenda

Introduction to Android

Getting Started with Tizen SDK : How to develop a Web app. Hong Gyungpyo 洪 競 杓 Samsung Electronics Co., Ltd

Introduction to Java

Mobile Operating Systems Lesson 07 Symbian OS

1.00 Lecture 1. Course information Course staff (TA, instructor names on syllabus/faq): 2 instructors, 4 TAs, 2 Lab TAs, graders

Eclipse 4 RCP application Development COURSE OUTLINE

Using mobile phones to access Web Services in a secure way. Dan Marinescu

Wireless Java Programming for Enterprise Applications

2 Introduction to Java. Introduction to Programming 1 1

Publishing to TIZEN Using the Automated Conversion/Repackaging of Existing Android Apps. Hyeokgon Ryu, Infraware Technology, Ltd.

Mobile Operating Systems Lesson 03 PalmOS Part 1

- Applet java appaiono di frequente nelle pagine web - Come funziona l'interprete contenuto in ogni browser di un certo livello? - Per approfondire

ANDROID PROGRAMMING - INTRODUCTION. Roberto Beraldi

Write. Once. Deploy. Anywhere. Anatole Wilson. Writing Applications for mobile devices and reducing device fragmentation with NetBeans Mobility Pack

Review of J2ME and J2ME-based Mobile Applications

ORACLE MOBILE APPLICATION FRAMEWORK DATA SHEET

Mobile Application Languages XML, Java, J2ME and JavaCard Lesson 04 Java

qwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmq

Real Time Dynamic Mobile Scheduling System. Thesis proposal. For the degree of Master of Science in Computer Science

ORACLE ADF MOBILE DATA SHEET

Overview focus on breadth understanding not depth (that s what the labs are for )

Oracle Java SE and Oracle Java Embedded Products

Android Developer Fundamental 1

Mobile Operating Systems Lesson 05 Windows CE Part 1

Introduction to Android Development. Jeff Avery CS349, Mar 2013

Android Application Development Lecture Notes INDEX

ROBOTICS AND AUTONOMOUS SYSTEMS

Performance Management for Cloudbased STC 2012

Tutorial: Getting Started

Here to take you beyond Mobile Application development using Android Course details

«compl*tc IDIOT'S GUIDE. Android App. Development. by Christopher Froehlich ALPHA. A member of Penguin Group (USA) Inc.

Module Title: Software Development A: Mobile Application Development

Networks and Services

Reminders. Lab opens from today. Many students want to use the extra I/O pins on

picojava TM : A Hardware Implementation of the Java Virtual Machine

EFFECTIVE QUERY RETRIEVAL SYSTEM IN MOBILE BUSINESS ENVIRONMENT

::. Contenuti della lezione *+ ') $ &,!!!$!-,.../- ' % + &

Transcription:

Y39PDA Development of Java ME application České vysoké učení technické v Praze Fakulta Elektrotechnická

Content What is Java ME Low Level a High Level API What is JSR LBS Java ME app. life-cycle 2/29

Is Java ME still important? 3/29

What is Java ME? Officially Java Platform, Micro Edition Formerly known as J2ME, Platform for devices with limited computing power Cell phones Handheld devices Industrial controls Set-top boxes Subset of Java SE?? 4/29

5/29

What is KVM? KVM virtual machine for mobile devices Supports only subset of JVM functions For ex. no floating point operation support Written in C K in KVM stands for Kilobyte Running on kilobytes of memory 40 kilobytes to 80 kilobytes of memory for VM core 6/29

Configurations CDC and CLDC CDC - Connected Device Configuration CLDC - Connected, Limited Device Configuration 7/29

Configuration CDC Using full Java VM Typical requirements 32-bit processor Minimum 512K for the runtime environment at least 256K to hold and run applications. PDA devices 8/29

Configuration CLDC Using KVM Typical requirements 160 to 512 KB total memory available for the Java platform 16-bit or 32-bit processor low power consumption, often battery powered intermittent network connectivity (often wireless) with potentially limited bandwidth 9/29

Profile MIDP screen size of approximately (at least) 96x54 pixels display color depth of 1 bit one- or two-handed keyboard or touch screen input device 128 KB nonvolatile memory for MIDP components 8 KB nonvolatile memory for application-persistent data 32 KB volatile runtime memory for Java heap two-way wireless connectivity 10/29

Low Level and High Level API Java ME supports two approaches of GUI development Low Level API javax.microedition.lcdui.canvas High Level API javax.microedition.lcdui.screen 11/29

Difference between Low Level and High Level API (1) Low Level API Fully control graphical design of application (drawing on canvas) More difficult application development Depends on target device (display size) Limited portability on other devices Possible usage of numerical keypad (0-9) for controlling application (keypressed events) 12/29

Difference between Low Level and High Level API (2) High Level API Application build up from set of UI components and user controls (forms, text boxes, check boxes etc.) Easy and rapid app. development Functionality independent on target device Easy portability on other devices (high compatibility) Impossible to fully control graphical design of app. (depends on device and implementation of MIDP in device) Impossible -> left/right soft key (controlled by application manager) Impossible to use num. keyboard (0-9) for controlling app. 13/29

Difference between Low Level and High Level API (3) 14/29

Other UI toolkits Based on Low Level API (javax.microedition.lcdui.canvas) J2ME Polish LWUIT (Lightweight User Interface Toolkit) 15/29

LWUIT Inspired by the architecture of Java Swing MVC Features Basic set of components Flexible layouts Style Theming Runs on JavaME Android BlackBerry LWUIT Resource Editor 16/29

What is JSR? JSR = Java Specification Requests Formal documents that describe proposed specifications and technologies for adding to the Java platform. Final JSR provides a reference implementation that is a free implementation of the technology in source code form and Technology Compatibility Kit to verify the API specification 17/29

18/29

Useful JSR s JSR 75 - PIM and FileConnection API Calendars Filesystem JSR 82 - APIs for Bluetooth communication JSR 179 - Location API Connection to GPS (A-GPS) Internal Bluetooth Acquiring coordinates 19/29

LBS Location Based Services Parsing of NMEA-0183 messages Used by GPS for communication with other devices Complicated development Using Location API (JSR 179) if target device implements it Development for Location API is easy 20/29

NMEA - National Marine Electronics Association $GPRMC,162352,A,5053.10,N,00849.14,E,150.0,2 35.3,301294,,*10 $GPRMB,A,0.42,L,EDFN,EDFQ,5102.20,N,00840.80,E,010.5,330.1,-018.6,V*08 $GPWPL,5052.50,N,00848.88,E,EDFN*41 $GPGLL,5053.10,N,00849.12,E*6F $PGRMZ,635,f,3*1B $GPXTE,A,A,0.41,L,N*6B $GPBWC,162352,5102.20,N,00840.80,E,330.2,T,, M,010.5,N,EDFQ*3C 21/29

NMEA - National Marine Electronics Association NMEA message $GPGLL,4916.45,N,12311.12,W,225444,A,*1D Where: GLL Geographic position, Lat and Lon 4916.46,N Latitude 49 deg. 16.45 min. North 12311.12,W Longitude 123 deg. 11.12 min. West 225444 Fix taken at 22:54:44 UTC A Data Active or V (void) *id checksum data 22/29

LBS using of Location API... // Set criteria for selecting a location provider: // accurate to 500 meters horizontally Criteria cr= new Criteria(); cr.sethorizontalaccuracy(500); // Get an instance of the provider LocationProvider lp= LocationProvider.getInstance(cr); // Request the location, setting a one-minute timeout Location l = lp.getlocation(60); Coordinates c = l.getqualifiedcoordinates(); if(c!= null ) { // Use coordinate information double lat = c.getlatitude(); double lon = c.getlongitude(); }... 23/29

MIDlet vs. Java ME application start public class Test extends MIDlet{ private boolean once = false; Pokus() { } not supported by S40, S60 paused startapp() pauseapp() destroyapp() active public void startapp() { if ( once == false ) { once = true; // resource allocation } } // other resource allocation // logic public void pauseapp() { // resource release } destroyed public void destroyapp() { // all resource release } } 24/29

MIDlet vs. Java ME application start running main() class Test extends net.rim.device.api.ui.uiapplication { public static void main(string[] args) { // resource allocation // logic // resource release } } end 25/29

MIDlet vs. Java ME application start start startapp() main() paused active running pauseapp() destroyapp() end destroyed 26/29

Java ME Architecture for BlackBerry Java Application BlackBerry API Java ME API (MIDP 2.0, CLDC 1.1) Java Virtual Machine HW Mixing Java ME GUI and BlackBerry GUI not possible javax.microedition.lcdui net.rim.device.api.ui 27/29

Java ME code performance use local variables faster access than to class members use threads for operation longer than 0.1 seconds filesystem, network, bluetooth, etc. access and declaration of data structures everything what can be private declare it as private use final declaration memory allocation do not relay on efficiency of garbage collection do not allocate to much memory at once -> reuse objects use scalar types (int) instead of objects (Integer) optimize algorithms do not use recursion if not necessary 28/29

Java ME application deployment JAR vs. JAD JAR: Manifest, Java classes, resource files JAD: description about Java application needed for downloading Java application via network On BlackBerry JAR -> COD On Android -> MicroEmulator http://microemu.blogspot.com/2009/08/converting-javame-applications-to.html 29/29

More Resources and inspiration http://pda.felk.cvut.cz Martin Rýzl - Úvod do Java Micro Edition http://www.avc-cvut.cz/avc.php?id=3849 30/29

Thank you for attention 31/29