Your SlideShare is downloading. ×
Mobile Experiential Track
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Mobile Experiential Track

1,521
views

Published on

Published in: Technology, News & Politics

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,521
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
119
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Transcript

    • 1. Mobile Experiential on Java #1 Frans Thamura Arief Purnama Rahmat Azhari
    • 2. Agenda
      • Java Mobile Technology Overview
      • Nokia Devices
      • J2ME Development Concept
      • Developing with J2ME
      • User Interface Programming
      • Persistence Storage
      • Nokia UI Development
      • The Future
    • 3. Java Mobile Technology Overview
    • 4. Java Technology
      • Write Once carefully Run Anywhere optionally (WORA)
    • 5. J2ME 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
    • 6. CDLC 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
    • 7. Mobile Trend
      • Multipurpose Trend
    • 8. Mobile Development
      • From Java to Streaming
    • 9. Mobile Services Value Chain
      • Content Deliverable Concept
      Content Owner Content Owner
    • 10. Nokia Devices
    • 11. Nokia Devices
      • Nokia devices grouped according to capabilities:
        • Series 30
        • Series 40
        • Series 60
        • Series 80
        • Series 90
    • 12. Nokia 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
    • 13. Nokia 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
    • 14. Nokia 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
    • 15.
      • Nokia 7650
      • Nokia 3650
      Nokia Series 60 devices ... basic functionality originates from Series 60 platform on Symbian OS Nokia N-Gage TM mobile game deck device Siemens SX1 Samsung SGH-D700
    • 16. Nokia Series 60 UI
      • Nokia UI Screen
    • 17. Nokia 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
    • 18. Complementary UI designs 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 Platform UIQ Symbian OS support V7.0 and onwards V6.1 and onwards UIQ
    • 19. J2ME Development Concept
    • 20. J2ME 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
    • 21. Tool 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?
    • 22. Developing 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
    • 23. Developing Midlets
      • The Midlet lifecycle
        • A device will call the methods shown here as appropriate
      • Midlet can control its own lifecycle
        • notifyPaused()
        • notifyDestroyed()
    • 24. Developing with MIDP
      • Development process
        • Subclass MIDlet class
        • Override lifecycle methods
        • Compile
        • Pre-verify
        • Package
          • Create jar file
          • Create application descriptor (jad file)
        • Install and run, or emulate
    • 25. MIDP application structure
      • A MIDP application comprises two files
        • jad file (application descriptor)
        • jar file
        • a Midlet suite is a collection of related Midlets
    • 26. The 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
    • 27. The 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
    • 28. Demo
      • Sun Java Wireless Toolkit
      • Nokia J2ME Toolkit
    • 29. Developing with J2ME
    • 30. Developing with J2ME
      • Elementary MIDP
        • User Interface Programming
        • Persisting Data
        • Networking
      • Extension packages
        • Nokia UI API classes
    • 31. User Interface Programming
    • 32. User 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
    • 33. User 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)
    • 34. User Interface Programming (List)
      • A List example:
        • list = new List(&quot;Select artist:&quot;, List.EXCLUSIVE);
        • list.append(&quot;B2K&quot;,null);
        • list.append(&quot;Babyface&quot;,null);
      • List types include:
        • EXCLUSIVE
        • MULTIPLE
        • IMPLICIT
    • 35. User Interface Programming (TextBox)
      • A TextBox example:
        • TextBox textBox = new TextBox(&quot;Email address:&quot;,&quot;Text&quot;, 30,TextField.EMAILADDR);
        • Text constraints include:
          • ANY
          • EMAILADDR
          • NUMERIC
          • PHONENUMBER
          • URL
    • 36. 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(&quot;Default settings&quot;);
        • form.append(new Gauge(&quot;Earpiece volume:&quot;,true,10,5));
        • form.append(new Gauge(&quot;Ringer volume:&quot;,true,10,5));
    • 37. 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
    • 38. User Interface Programming (Command)
      • A Commands example:
          • Form f = new Form(...);
          • f.addCommand(new Command(&quot;Exit&quot;, Command.EXIT, 0));
          • f.setCommandListener(new CommandListener() {
          • public void commandAction(Command c, Displayable d)
            • {
              • if (c.getCommandType() == Command.EXIT) {
              • notifyDestroyed();
              • }
            • }
          • });
    • 39. MIDP Development Hierarchy
    • 40. Demo
      • User Interface Programming
    • 41. Persistence Storage
    • 42. Persistent Storage
      • Midlets will need to persist data
        • Users name
        • Mail host address
        • High score for a game
      • MIDP includes a specification for Persistent Storage
        • R ecord M anagement S ystem (RMS)
        • Simple database model
        • Holds unique records for each Midlet suite
        • Device responsible for storing data
    • 43. Persistent 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
    • 44. Persistent 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(&quot;my-data&quot;,false);
              • } catch(RecordStoreNotFoundException e)
              • {
            • // doesn't exist
              • } catch(RecordStoreException e){
            • // some other error
              • }
    • 45. Persistent 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);
          • } ...
    • 46. Demo
      • Persistence Storage Development
    • 47. Nokia UI Development
    • 48. Nokia 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
    • 49. Nokia UI Other
      • Nokia UI supports other features
        • Sound
        • Device control
          • Volume of device
          • Backlight
          • Vibration
      • User preferences may prevent these from being accessible
    • 50. Application Design
      • Screens are organized into a flow:
        • Most require simple behavior
        • Some more complex
    • 51. Adapting to Devices
      • Different devices have different capabilities
        • Must cater for these
    • 52. The Future
    • 53. J2ME 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
    • 54. Thank You Frans Thamura Arief Purnama Rahmat Azhari [email_address]