26
Mobile Application Development 1 01 Introduction to Mobile Application Development

Mobile Application Development JEDI

Embed Size (px)

DESCRIPTION

Mobile Application Development

Citation preview

Page 1: Mobile Application Development JEDI

Mobile Application Development 1

01 Introduction to Mobile Application Development

Page 2: Mobile Application Development JEDI

Mobile Application Development 2

Objectives

At the end of the lesson, the student should be able to:

● Identify the characteristics of mobile devices

● Describe the J2ME architecture

● Know the role of configurations and profiles

● Identify the APIs provided by MIDP

● Describe the MIDlet life cycle

Page 3: Mobile Application Development JEDI

Mobile Application Development 3

Mobile Application Devt

●Mobile Devices

●Java 2 Micro Edition

●CLDC

●CDC

●MIDP

●MIDlets

Page 4: Mobile Application Development JEDI

Mobile Application Development 4

Mobile Devices● Small in size

● Limited memory

● Limited processing power

● Low power consumption

● Robust and reliable

● Limited connectivity

● Short wakeup time

Page 5: Mobile Application Development JEDI

Mobile Application Development 5

Mobile Application Devt●Mobile Devices

●Java 2 Micro Edition

●CLDC

●CDC

●MIDP

●MIDlets

Page 6: Mobile Application Development JEDI

Mobile Application Development 6

Java Platform

ServersServers

J ava 2 Micro Edition (J 2ME)

Desktopmachines

High-endconsumerdevices Low-end

consumer devices

SmartCards

J2EEJ2SE

CDC

Foundation Profile

Personal Profile

CLDC

MIDP

OptionalPackages

OptionalPackages

J avaCard

J ava Virtual Machine KVM Card VM

Page 7: Mobile Application Development JEDI

Mobile Application Development 7

J2ME Architecture

Applications

ProfileOptionalPackages

OEMAPI s

Configuration {

Device Operating System

LibrariesJ ava Virtual Machine

Page 8: Mobile Application Development JEDI

Mobile Application Development 8

Configuration

● the subset of the Java programming language

● the functionality of the Java Virtual Machine (VM)

● core platform libraries

● security and networking features

Page 9: Mobile Application Development JEDI

Mobile Application Development 9

Profiles

A profile defines additional sets of APIs and features for a particular market, device category or industry.

While a configuration defines the base libraries, profiles define the libraries that are important to make effective applications. These libraries include the user interface, networking, and storage APIs.

Page 10: Mobile Application Development JEDI

Mobile Application Development 10

Mobile Application Devt●Mobile Devices

●Java 2 Micro Edition

●CLDC

●CDC

●MIDP

●MIDlets

Page 11: Mobile Application Development JEDI

Mobile Application Development 11

CLDC● Java language and Virtual Machine (VM) features

● Core libraries (java.lang.*, java.util.*)

● Input/Output (java.io.*)

● Security

● Networking

● Internationalization

Page 12: Mobile Application Development JEDI

Mobile Application Development 12

Missing Features● finalization of class instances

● asynchronous exceptions

● some error classes

● user-defined class loaders

● reflection

● Java Native Interface (JNI)

● thread groups and daemon threads

Page 13: Mobile Application Development JEDI

Mobile Application Development 13

CLDC Device Characteristics● at least 192kb of memory for Java platform (160kb non-

volatile memory for VM and libraries and 32kb volatile memory for VM runtime)

● 16 or 32 bit processor

● low power consumption (usually battery powered)

● limited, intermittent network connection with limited bandwidth (usually wireless)

Page 14: Mobile Application Development JEDI

Mobile Application Development 14

Class Verification

compile (javac)

preverify

verify(runtime)

interpret

File.java

File.class

File.class

Development Machine Target Device

I nstall

Page 15: Mobile Application Development JEDI

Mobile Application Development 15

Generic Connection Framework

StreamConnectionNotifier

Connection

DatagramConnection

InputConnection OutputConnection

StreamConnection

ContentConnection

Page 16: Mobile Application Development JEDI

Mobile Application Development 16

Mobile Application Devt●Mobile Devices

●Java 2 Micro Edition

●CLDC

●CDC

●MIDP

●MIDlets

Page 17: Mobile Application Development JEDI

Mobile Application Development 17

CDC● java.io

● java.lang

● java.lang.ref

● java.lang.math

● java.net

● java.security

● java.security.cert

● java.text

● java.util

● java.util.jar

● java.util.zip

Page 18: Mobile Application Development JEDI

Mobile Application Development 18

JWTI

MI Dlets

MI DP 2.0OptionalPackages

OEMAPI s

CLDC 1.0 or 1.1

WMA1.1

MMAPI1.1

Device Operating System

Page 19: Mobile Application Development JEDI

Mobile Application Development 19

Mobile Application Devt●Mobile Devices

●Java 2 Micro Edition

●CLDC

●CDC

●MIDP

●MIDlets

Page 20: Mobile Application Development JEDI

Mobile Application Development 20

MID Device● Display:

● Screen-size: 96x54

● Display depth: 1-bit

● Pixel aspect ratio: approximately 1:1

● Input:

● One or more of the following user-input mechanisms: one-handed keyboard, two-handed keyboard, or touch screen

Page 21: Mobile Application Development JEDI

Mobile Application Development 21

MID Device● Memory:

● 256 kilobytes of non-volatile memory for the MIDP implementation, beyond what's required for CLDC.

● 8 kilobytes of non-volatile memory for application-created persistent data

● 128 kilobytes of volatile memory for the Java runtime (e.g., the Java heap)

Page 22: Mobile Application Development JEDI

Mobile Application Development 22

MID Device● Networking:

● Two-way, wireless, possibly intermittent, with limited bandwidth

● Sound:

● The ability to play tones, either via dedicated hardware or via software algorithm.

Page 23: Mobile Application Development JEDI

Mobile Application Development 23

Mobile Application Devt●Mobile Devices

●Java 2 Micro Edition

●CLDC

●CDC

●MIDP

●MIDlets

Page 24: Mobile Application Development JEDI

Mobile Application Development 24

MIDlet● A MIDP application is called a MIDlet. The device's

application management software (AMS) interacts directly with the MIDlet with the MIDlet's create, start, pause, and destroy methods.

● The MIDlet is part of the javax.microedition.midlet package. A MIDlet must extend the MIDlet class. It can request parameters from the AMS as defined in the application descriptor (JAD).

● A MIDlet does not have (and MUST NOT have) a public static void main(String[] argv) method. It will not be recognized by the AMS as the program's starting point.

Page 25: Mobile Application Development JEDI

Mobile Application Development 25

MIDlet Life Cycle

Active

Paused

Destroyed

destroyApp()

destroyApp()

startApp()

pauseApp()

new

Page 26: Mobile Application Development JEDI

Mobile Application Development 26

Summary

●Mobile Devices

●Java 2 Micro Edition

●CLDC

●CDC

●MIDP

●MIDlets