mobile experiential track

54
Help You Manage and Control Help You Manage and Control © 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed. be a Part of be a Part of Emotional Emotional Revolution Revolution Mobile Experiential on Java #1 Mobile Experiential on Java #1 Frans Thamura Frans Thamura Arief Purnama Arief Purnama Rahmat Azhari Rahmat Azhari

Upload: frans-thamura

Post on 21-Nov-2014

2.455 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Mobile Experiential Track

Help You Manage and ControlHelp You Manage and Control

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Mobile Experiential on Java #1Mobile Experiential on Java #1

Frans ThamuraFrans Thamura

Arief PurnamaArief Purnama

Rahmat AzhariRahmat Azhari

Page 2: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

AgendaAgenda

• Java Mobile Technology Overview

• Nokia Devices

• J2ME Development Concept

• Developing with J2ME

• User Interface Programming

• Persistence Storage

• Nokia UI Development

• The Future

Page 3: Mobile Experiential Track

Help You Manage and ControlHelp You Manage and Control

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Java Mobile Technology OverviewJava Mobile Technology Overview

Page 4: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Java TechnologyJava Technology

• Write Once carefully Run Anywhere optionally (WORA)

Page 5: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

J2ME and MIDPJ2ME and MIDP

• For Wireless Devices

- Commonly use CLDC Configuration• Connected Limited Device Configuration

• 128kb ROM for JVM and system classes• 32kb RAM (min) for application classes

- MIDP Profile• Mobile Information Device Profile• Provides:

• Simple LCD based GUI classes• Basic networking facilities• Persistent data

Page 6: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

CDLC FeaturesCDLC Features

• Fundamental packages re-specified

• Most package removed

- java.lang• System has no in field

- java.io• No buffered classes

- java.util• Greatly reduced• Just 9 classes

• there are 41 in Java 1.4.0

• No dynamic byte code verification

- J2SE verifier too expensive on memory

Page 7: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Mobile TrendMobile Trend

• Multipurpose Trend

Page 8: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Mobile DevelopmentMobile Development

• From Java to Streaming

Page 9: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Mobile Services Value ChainMobile Services Value Chain

• Content Deliverable Concept

ContentOwner

ContentOwner

Page 10: Mobile Experiential Track

Help You Manage and ControlHelp You Manage and Control

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Nokia DevicesNokia Devices

Page 11: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Nokia DevicesNokia Devices

• Nokia devices grouped according to capabilities:

- Series 30

- Series 40

- Series 60

- Series 80

- Series 90

Page 12: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Nokia Series 30Nokia Series 30

• Cost driven devices

• Nokia OS

• MIDP 1.0, CLDC 1.0

• Nokia UI API

• XHTML, MMS

• Example: 6310i

• Maximum size of one MIDlet suite: 30 KB

• 96x65 pixels

• Maximum data storage space for MIDlet: 20 KB

Page 13: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Nokia Series 40Nokia Series 40

• Size driven colour platform

• Nokia OS

• MIDP 1.0, CLDC 1.0

• Nokia UI API

• XHTML, MMS

• Example: 7210

• Maximum size of one MIDlet suite: 64 KB

• 128x128 pixels

Page 14: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Nokia Series 60Nokia Series 60

• One hand operated feature platform

• Symbian OS

• MIDP 1.0, CLDC 1.0

• Nokia UI API (not backlight or vibrate)

• XHTML, MMS

• Example: 7210

• Memory available to Midlets : 4MB (max)

• 176x208 pixels

Page 15: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

... basic functionality originates from Series 60 platform on

Symbian OS

Nokia 7650 Nokia 3650 Nokia N-Gage TM mobile game deck device

Siemens SX1

Samsung SGH-D700

Nokia Series 60 devicesNokia Series 60 devices

Page 16: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Nokia Series 60 UINokia Series 60 UI

• Nokia UI Screen

Page 17: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Nokia Series 80Nokia Series 80

• One hand operated feature platform

• QWERY Keyboard

• Symbian OS

• MIDP 1.0, CLDC 1.0

• Personal Java, JavaPhone API

• MIDP 2.0 (Nokia 9500 and 9300)

• XHTML, MMS

• Example: 9210

• Memory available to Midlets : ~14MB

• 640x200 pixels

Page 18: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Input method

One-hand operation Pen input

Display size

176 x 208 208-240 x 320

Applications • Multimedia messaging• Imaging• Entertainment, downloading• Personal Information Management• Office connectivity

• Business applications • Entertainment, downloading• Personal Information Management• Web browsing• Multimedia messaging, Imaging

Series 60 PlatformUIQ

Symbian OS support V7.0 and onwardsV6.1 and onwards

Complementary UI designsComplementary UI designs

UIQ

Page 19: Mobile Experiential Track

Help You Manage and ControlHelp You Manage and Control

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

J2ME Development ConceptJ2ME Development Concept

Page 20: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

J2ME DevelopmentJ2ME Development

• Can use basic J2ME tools to build apps

- Tool support makes development simpler

• Automated verification and packaging

- Sun J2ME Wireless Toolkit

- Sun Java Studio Mobile Edition

- Borland JBuilder Mobile Toolkit

- Eclipse

- Websphere Devices Developer

• Comes bundled with wireless toolkit

• Simple integration with Nokia SDK

Page 21: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Tool supportTool support

• Nokia Developer’s Suite

• Integrates with JBuilder, or Sun One Studio 4

- Run as standalone

- Includes Nokia emulators

- 6310i

- Symbian

• Download more emulators

- Series 40 and 60

• Others

- Jakarta Ant?

Page 22: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Developing with MIDPDeveloping with MIDP

• MIDP applications are called Midlets

- Conceptually similar to Applets

• Can be downloaded

• Executed in host environment

- Subclass the MIDlet class

• Provide no argument constructor

• Must not implement main method

• Implement lifecycle methods

Page 23: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Developing MidletsDeveloping Midlets

• The Midlet lifecycle

- A device will call the methods shown here as appropriate

• Midlet can control its own lifecycle

- notifyPaused()

- notifyDestroyed()

Page 24: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Developing with MIDPDeveloping with MIDP

• Development process

1. Subclass MIDlet class

2. Override lifecycle methods

3. Compile

4. Pre-verify

5. Package• Create jar file• Create application descriptor (jad file)

6. Install and run, or emulate

Page 25: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

MIDP application structureMIDP application structure

• A MIDP application comprises two files

- jad file (application descriptor)

- jar file

- a Midlet suite is a collection of related Midlets

Page 26: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

The jad fileThe jad file

• A file describing the Midlet suite

• Must include:

- MIDlet-Name• name of the Midlet suite

- MIDlet-<n>• A name for each Midlet in the suite

- MIDlet-Version

- MIDlet-Vendor

- MIDlet-Jar-URL

- MIDlet-Jar-Size

• Information regarding the Midlet suite

- May include:• MIDlet-Description

• MIDlet-Icon

• MIDlet-Info-URL

- MIDlet-Data-Size• Minimum persistent storage required by

suite

• Default is Zero

Page 27: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

The jar fileThe jar file

• Follows standard jar file format

- Manifest to include all data found in jad file• Except: MIDlet-Jar-Size

- Can include other resources• E.g: Images

- Must also contain:• MicroEdition-Profile• MicroEdition-Configuration

Page 28: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

DemoDemo

• Sun Java Wireless Toolkit

• Nokia J2ME Toolkit

Page 29: Mobile Experiential Track

Help You Manage and ControlHelp You Manage and Control

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Developing with J2MEDeveloping with J2ME

Page 30: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Developing with J2MEDeveloping with J2ME

• Elementary MIDP

- User Interface Programming

- Persisting Data

- Networking

• Extension packages

- Nokia UI API classes

Page 31: Mobile Experiential Track

Help You Manage and ControlHelp You Manage and Control

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

User Interface ProgrammingUser Interface Programming

Page 32: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

User Interface ProgrammingUser Interface Programming

• Limitation of display devices

- Colour or Black and White

- Display size & device memory

- Forget about AWT or Swing!• Too big• Overly complex• Tables, Dialogs, Multiple windows

• New API for user interfaces with MIDP

- Lightweight

- Designed for use with small screens• Based upon single display areas

Page 33: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

User Interface ProgrammingUser Interface Programming

• LCD user interface API

- In package:• javax.microedition.lcdui

• Simple structure

- Add Displayable items to a Display!

• Each Midlet has a single Display to use

- Use static method on Display class:• Display.getDisplay();

• User interface class hierarchy

- Screens are high level

- Canvas low level (see later)

Page 34: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

User Interface Programming (List)User Interface Programming (List)

• A List example:

- list = new List("Select artist:", List.EXCLUSIVE);

- list.append("B2K",null);

- list.append("Babyface",null);

• List types include:

- EXCLUSIVE

- MULTIPLE

- IMPLICIT

Page 35: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

User Interface Programming (TextBox)User Interface Programming (TextBox)

• A TextBox example:

- TextBox textBox = new TextBox("Email address:","Text", 30,TextField.EMAILADDR);

- Text constraints include:• ANY• EMAILADDR• NUMERIC• PHONENUMBER• URL

Page 36: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

User Interface Programming (Form)User Interface Programming (Form)

• Forms

- Like other Screen subclasses• occupies whole screen• can have tickers set• etc...

- Allow multiple items to be added• there are many subclasses of Item

• A Forms example:

- form = new Form("Default settings");

- form.append(new Gauge("Earpiece volume:",true,10,5));

- form.append(new Gauge("Ringer volume:",true,10,5));

Page 37: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

User Interface Programming (Command)User Interface Programming (Command)

• Notify user generated events

- J2SE applications use an event delegation model• Explicitly attached to event sources• Typically results in many anonymous classes

• More efficient to re-use objects

- J2ME applications use Commands• Many predefined types• Can be extended with custom types

Page 38: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

User Interface Programming (Command)User Interface Programming (Command)

• A Commands example:Form f = new Form(...);

f.addCommand(new Command("Exit", Command.EXIT, 0));

f.setCommandListener(new CommandListener() {

public void commandAction(Command c, Displayable d)

{

if (c.getCommandType() == Command.EXIT) {

notifyDestroyed();

}

}

});

Page 39: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

MIDP Development HierarchyMIDP Development Hierarchy

Page 40: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

DemoDemo

• User Interface Programming

Page 41: Mobile Experiential Track

Help You Manage and ControlHelp You Manage and Control

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Persistence StoragePersistence Storage

Page 42: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Persistent StoragePersistent Storage

• Midlets will need to persist data

- Users name

- Mail host address

- High score for a game

• MIDP includes a specification for Persistent Storage

- Record Management System (RMS)

- Simple database model

- Holds unique records for each Midlet suite

- Device responsible for storing data

Page 43: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Persistent StoragePersistent Storage

• Each Midlet suite shares records

- Care should be taken with concurrent access• multiple active Midlets• multi threaded Midlets

• writes to records guaranteed to be atomic• program defensively

• Very simple API

- javax.microedition.rms

- Only contains one class!• and four interfaces

Page 44: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Persistent StoragePersistent Storage

• Records are stored in a Record Store

- Use the RecordStore class

- Each record store is named• max 32 Unicode chars

RecordStore rs = null;

try {

rs = RecordStore.openRecordStore("my-data",false);

} catch(RecordStoreNotFoundException e)

{

// doesn't exist

} catch(RecordStoreException e){

// some other error

}

Page 45: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Persistent StoragePersistent Storage

• To create a new record

- specify the bytes you want to store

- each record within a store will have a unique number (id).

RecordStore rs = ...;

byte[] data = ...;

int id = -1; //record ids will always be > 0

try {

id = rs.addRecord(data, 0, data.length);

} ...

Page 46: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

DemoDemo

• Persistence Storage Development

Page 47: Mobile Experiential Track

Help You Manage and ControlHelp You Manage and Control

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Nokia UI DevelopmentNokia UI Development

Page 48: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Nokia UI DevelopmentNokia UI Development

• MIDP 1.0 UI limited

• Nokia address this with custom UI classes

- Included in upcoming MIDP2.0 specification

• New classes

- FullCanvas

- DirectGraphics

- DirectUtils

- DeviceControl

- Sound

Page 49: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Nokia UI OtherNokia UI Other

• Nokia UI supports other features

- Sound

- Device control• Volume of device• Backlight• Vibration

• User preferences may prevent these from being accessible

Page 50: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Application DesignApplication Design

• Screens are organized into a flow:

- Most require simple behavior

- Some more complex

Page 51: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Adapting to DevicesAdapting to Devices

• Different devices have different capabilities

- Must cater for these

Page 52: Mobile Experiential Track

Help You Manage and ControlHelp You Manage and Control

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

The FutureThe Future

Page 53: Mobile Experiential Track

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

J2ME FutureJ2ME Future

• Wireless Messaging (WM API, JSR 120)

• Mobile Media (MM API, JSR 135)

• Bluetooth API (JSR 82)

• SyncML

• MMS API (WM API 2.0)

• SIP API

• Game API

• 3D API

Page 54: Mobile Experiential Track

Help You Manage and ControlHelp You Manage and Control

© 2004, Intercitra. All rights reserved. Proprietary and Confidential - Not to be Copied or Distributed.

be a Part ofbe a Part ofEmotionalEmotional

RevolutionRevolution

Thank YouThank You

Frans ThamuraFrans Thamura

Arief PurnamaArief Purnama

Rahmat AzhariRahmat Azhari

[email protected]@intercitra.com