Post on 20-Feb-2023
1 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Java development on Nokia Platforms
Jarmo Lahtinen
Forum Nokia
St. PetersburgMay 24-25th, 2007
2 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Contents• Mobile development methods
• Java Opportunity, landscape and availability
• Java on Nokia platforms
• How to get started
• Tools & SDKs
• Questions
3 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Various methods for mobile development
Series 40Platform
Nokia
S60Platform
Symbian
Browser
Flash Lite
Java
S60 native C++
OtherIndustry
Platforms
Other OSPlatform
C++
Java™ ME MIDP/CLDC PP/CDC
Flash Lite
Browser
WidSets
WidSets
4 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Opportunity Quantified…
• S60: 100 million devices shipped to the market• 26 S60 3rd edition devices announced, 16 of them shipping
• Series 40: 32 3rd Edition devices announced
• 540 million platform devices shipped – all support Java
• 220 operators deployed Java technology
• 635+ Java technology-enabled handset models by 35+ vendors on the market
• 700+ million Java technology-enabled handsets on the market
• 350,000 Java technology developers focusing on mobile
• 50,000+ mobile Java technology-based applications on the market
• 1 million mobile Java technology developer toolkits downloaded
• ~23 million mobile Java technology downloads globally/month
5 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Java ME
JavaEE
JavaSE
CLDC 1.0/1.1
MIDP 1.0/2.0
JavaCard
CDC
profiles profiles
MobilePhones + Smartphones
Desktop
Server
SmartPhones... PDAs...
Smartcards...
Configuration: JVM specification + fundamental APIs e.g. CLDC 1.1
Profile: extra APIs for vertical segment, e.g. MIDP 2.0
Java Landscape
7 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
S60MIDP 2.0
CLDC 1.0
WMA 1.0
Bluetooth
(No OBEX)
MMAPI 1.0
FP1:
+Updated MMAPI with video recording and improved image
FP2:
CLDC 1.1
+Web Services API
+Bluetooth API (+push)
+M3G
+PIM & FileConnection API
+JTWI
FP3:
+ Updated Bluetooth API (+obex)
+Updated WMA
(Cell Broadcast)
+ Web Services API
+ Updated MMAPI with RTSP streaming
SERIES 40
MIDP 2.0
CLDC 1.0
WMA 1.0
MMAPI 1.0
Bluetooth API
(No OBEX)
*Some devices supported M3G+PIM+FC+MMAPI with video & camera
Java APIs on 2nd Edition
• Common APIs across 2nd Edition of both Series 40 and S60:
• MIDP 2.0, CLDC 1.0, MMAPI 1.0, WMA 1.0 and BT API
• Expect behavioral differences in • BT API, MMAPI, Push Registry support
• Due to…• Different hardware/native OS support
• Different codec support
• A non-mandated feature in a JSR that is implemented on one platform but not on the other due to memory/CPU limitations
8 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Java API on 3rd Edition
S60
APIs from S60 2nd Edition FP3 +
+SATSA API
+Location API
+SIP API
+WMA 2.0
FP1:
+ SVG
+ AMMS
+ Updated M3G
+ Updated MMAPI (HTTP Streaming)
FP2:
+MIDP 2.1
+MSA subset
Series 40
APIs from Series 40 2nd Edition
+CLDC 1.1
+Updated MMAPI (video+image+sample audio rendering)
+PIM &FC
+M3G
+USB/IR
FP1:
+WMA 2.0 (MMS support)
+SVG API
+Web Services API
FP2:
+APDU package from SATSA API
+MMAPI with RTSP & progressive music playback
• Common APIs across 3rd Edition of both Series 40 and S60
• MIDP 2.0, CLDC 1.1, MMAPI, WMA 1.0, BT API, PIM &FC API, M3G API
• Expect behavioral differences in • M3G on HW accelerated S60 devices
• PIM and FC API due to different OS and file systems
• Many more Java APIs added on top of S60 3rd Edition enabling creation of
• Peer to peer applications
• Location based networked/messaging applications
• Richer multimedia applications
• JSR 248 (MSA) seeks to achieve harmonization of Java APIs across platforms
• Does not bring new APIs
9 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Java APIs on S60 3rd Edition platforms
New (Subset)--MSA (JSR-248)
Radio, music, 3D audioNew (radio, music, 3D audio)
-AMMS (JSR-234)
X (updates)New-SVG (JSR-226)
XXNewMessaging 2.0 (JSR-205)
(JSR-248)XXJTWI (JSR-185)
1.11.1XMobile 3D Graphics (JSR-184)
XXNewSIP (JSR-180)
XXNewLocation (JSR-179)
Crypto&PKICrypto&PKINew (Crypto&PKI)SATSA (JSR-177)
XXNewWeb Services (JSR-172)
XXXMMAPI (JSR-135)
(JSR-205)(JSR-205)(JSR-205)Messaging (JSR-120)
1.1XXBluetooth (JSR-82)
XXXPIM and File (JSR-75)
2.1XXMIDP 2 (JSR-118)
XXXCLDC 1.1 (JSR-139)
S603rd Edition FP2S60 3rd Edition FP1S60 3rd Edition
10 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Series 40 5th Edition
• Java MIDP has been updated from 2.0 to 2.1, • Addition of OCSP protocol.
• Bluetooth APIs v1.1 support for OBEX
• MMAPI supports device media keys
• Web Services API implements the Remote Procedural Call (RPC) package allowing applications to use SOAP to access public and private Web services.
• SATSA includes the SATSA-CRYPTO optional package, allowing applications to offer cryptographic features.
• AMMS API added to provide 3D audio and music support
11 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Java APIs on Series 40 3rd Edition platforms
New (Subset)
Radio, music, 3D audio
X (updates)
X
X
1.1
-
-
APDU package
X
X
(JSR-205)
1.1
X
2.1
X
Series 40 3rd Edition FP2
X
Radio, music, 3D audio
X
X
X
1.1
-
-
+ CRYPTO package
X
X
(JSR-205)
1.1
X
2.1
X
Series 40 5th Ed.
--MSA (JSR-248)
New (radio, music, 3D audio)
-AMMS (JSR-234)
New-SVG (JSR-226)
XNewMessaging 2.0 (JSR-205)
XXJTWI (JSR-185)
1.1XMobile 3D Graphics (JSR-184)
--SIP (JSR-180)
--Location (JSR-179)
--SATSA (JSR-177)
XML Parser (JAXP)-Web Services (JSR-172)
XXMMAPI (JSR-135)
(JSR-205)XMessaging (JSR-120)
XXBluetooth (JSR-82)
XXPIM and File (JSR-75)
XXMIDP 2 (JSR-118)
XXCLDC 1.1 (JSR-139)
Series 40 3rd Edition FP1
Series 40 3rd Edition
12 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Series 40 and S60 Java ME Implementations
• Different installation procedures over IR/Bluetooth
• Use of network access point used by MIDlets differs
• Menu Command placement on high-level UI differs due to labeled middle soft key on Series 40
• No background MIDlets on Series 40 devices• Affects how platformRequest() behaves
• Different set of JSRs and optional packages• Use system properties to find out availability of optional features
• API implementation differences (e.g. MMAPI locators)
• Device-level differences: Optimal icon sizes, supported audio and video formats, file system access, maximum JAR size and available heap size
• Availability of On Device Debugging (S60 3rd Edition)
13 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Java Security
• Users of your application will encounter security prompts at some point• Some can be avoided by signing but some cannot be
• When trying to use protected APIs• Like networking, user data, authentication, multimedia recording etc.
14 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Signing & Java ME Security Model (MIDP 2.0)
•Unsigned MIDlets are placed in lowest security domain
•Signed MIDlets are placed in one of 3 domains based on the domain of the root certificate on the phone
• Trusted 3rd party
• Operator (Carrier)
• Manufacturer
•Access to certain APIs and methods is dependent of the domain
• Not allowed
• Ask every time
• Ask once per session
• Always allowed
15 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
How to get started
Step 1 : Choose your favorite IDE
Step 2 : Download and install Carbide.j, integrated with the IDE of your choice
16 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Prototype SDKs
•Based on reference implementation.
•Meant for early adopters before real SDK is available.
•Provides UI and new APIs, implementation not exactly the same as in real device
•Fast and efficient to use
Prototype SDK
17 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Platform SDKs
•Based on real device/platform software
•Meant for final MIDlet development.
•Provides a device/platform software with same features as in real device.
Developer Platform SDK
18 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Develop and testwith Prototype SDK
Is Platform SDK Available?
How to get started
Step 3 : Download the proper SDK and start development and testing phase
Develop and testwith Platform SDK
No Yes
19 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
How to get started
Step 4 : Use Carbide.j to (sign and) deploy the application to a real device. Perform all functionality tests and, if needed, return to Step 3.
Bluetooth, USB, OTA
20 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
How to get started
You can download all the Java development tools from the Forum Nokia web site:
http://forum.nokia.com/tools
21 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Flash Lite development on Nokia Platforms
Jarmo Lahtinen
Forum Nokia
St. PetersburgMay 24-25th, 2007
22 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Contents
• What is Flash Lite?
• Flash Lite 1.x and 2.x
• Flash Lite on Nokia platforms
• Building Flash Lite applications
• Questions
23 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
What is Flash Lite?
• Allows Flash development for mobile devices• Flash is application authoring software developed by Macromedia• It is used to create vector graphics-based animation programs• Flash Lite can be used to create
• Standalone applications like games• Mobile Device UI • Applications• Screensavers• Wallpapers• Animated ringtones• Others, depending on the handset
25 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Flash Lite 1.x vs Flash Lite 2.x (1/2)
YesNoSupport for saving data on the device
YesYes (packaged inside a swf-file only)
Support for image download
Yes (XML and text)Yes (text, value-name pairs only)
Data download from network
YesNoSupport for device video
Flash 7 (ActionScript 2.0)
Flash 4 (ActionScript pre-1.0)
Based on
Flash Lite 2.xFlash Lite 1.x
26 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Flash Lite 1.x vs Flash Lite 2.x (2/2)
SupportedNot supportedInheritance and casting
SupportedNot supportedMobile Shared Objects (MSOs)
Public, Private, Not specified (public)
NoneAccess control modifiers
YesNoClasses
YesNoAllows strict data typing
String, Number, Boolean, Array, MovieClip, Object,Function(, null, undefined)
String, Number, Boolean(, undefined)
Datatypes
Flash Lite 2.xFlash Lite 1.1
27 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Flash Lite versions
Flash Lite 1.1(pre-installed March 06)
• Based on Flash Player 4
• Simple types of content
• Support for basic data loading
• No support for device video or XML
• Casual games, dynamic apps
• Wallpapers, screensavers
Flash Lite 2.0(pre-installed November 06)
• Based on Flash Player 7
• Complex types of apps and content
• Support for device video, audio, images, saving data, XML
• Casual games, dynamic apps
• Wallpapers, screensavers
28 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Nokia devices supporting Flash Lite
• Flash Lite 1.1• Series 40 3rd Edition FP 1 devices
• S60 2nd Edition FP 3 and S60 3rd Ed. devices
• Flash Lite 2.0• Series 40 3rd Edition FP 2 devices
• S60 3rd Edition FP1 devices
• Download a free copy of the
Flash Lite 2.1 Player for S60 devices
Nokia 6126Nokia 6136
Nokia N70
Nokia 5300Nokia N95
29 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Flash Professional 8 environment
Timeline
Stage
Property inspector
Panels
30 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Building Flash Lite applications
• The time-line–based method• Commonly used in Flash Lite 1.1• Keyframes to define states that the application can exist in• Code can be added directly to the frames• Fast way to try and demonstrate things• Suitable for small-scale applications and for people not so familiar with
programming
• The pure code method• Made possible by Flash Lite 2.x• All program logic in ActionScript code• Utilizing external .as files with AS2 classes• Application control in the code instead of timeline• Suitable for larger applications and for people familiar with OOP
31 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Links
• Getting started information from Adobe:
• http://www.adobe.com/devnet/devices/flashlite_gettingstarted.html
• Trial version of the tools available:
• Flash CS3 Professional, can be found here (registration needed): http://www.adobe.com/go/devcenter_fl_try
• Flash Lite 2/2.1 Update to Flash Professional 8: http://www.adobe.com/support/flash/downloads.html
• Other additional software and documents:
• http://www.adobe.com/devnet/devices/flashlite.html
• For example Flash Lite 2.1 Player for S60 devices
• Device profiles (a kind of SDKs):
• http://www.adobe.com/products/flash/download/device_profiles/
• Nokia devices supporting Flash Lite:
• http://www.adobe.com/devnet/devices/nokia.html
• “Flash Applications for Mobile Devices” book:
• http://www.flashmobilebook.com/
32 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Comparison between Mobile Java and Flash Lite (and Python)
Jarmo Lahtinen
Forum Nokia
St. PetersburgMay 24-25th, 2007
33 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Pros and Cons of the runtimes
No pre-installations
Localization support
Work-in progress
Python 2.2.2
Dev tools ($)
Flash Lite 1.1 limitations
Localization support
Fragmentation
Sandboxed (no JNI)
Limited access to native capabilities
Localization support
App. start-up speed (S60)
Con
Extensibility
Access to native capab.
Open Source
Market potential
Dev tools (quality)
UI scaling
Getting started
Huge market potential
Selection of dev tools ($)
Pro
PythonFlash LiteJava ME
34 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
General level comparison
YesYes (limitations)NoPossibility to upgrade
Own release cycle (about monthly)
Platform releasesPlatform releasesRelease schedule
Community (Open Source)
Proprietary (Adobe)Standards specification (JCP)
Evolution
PythonFlash LiteJava ME
35 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Tools
n/a?DecompilersObfuscationOptimization, etc.
Emulator, (Bluetooth console)
Flash/CS3 Device Central Emulator
SDK/Emulators, On-Device-Debugging
Debugging & testing
YesNoNo“On-device-programming”
S60 SDK (for emulator), pywin (or text editor)
Flash Professional 8 (Flash Lite 2 upgrades + device profile updates)
JDK, IDE (Eclipse+Carbide.j or NetBeans), platform SDK
Getting started
Free$700 (free 30-day trial)
freeTool cost
WindowsWindows, MacWindowsDev. platforms
PythonFlash LiteJava ME
36 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Development time
• This is always personal issue
• General rule of thumb• Flash Lite is faster to get started for non-programmers
• Java ME is slowest to get started
37 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Phone Capability Access
YesNo (network name)
NoGet MNC/MCC
Yes/NoNo/NoNo/NoGet/Set ring type Yes/NoNo/NoNo/NoGet/Set profile
Yes (also platform)YesYesGet phone model
Yes/No(Yes)Yes/NoGet IMEI/IMSI
YesYesNoBattery level
YesYesNoNetwork signal
YesNoNoRead Inbox
YesYesYes (JSR-205)Send SMS/MMS
NoNoNoAnswer a call
Yes (record, end)NoNoControl a call
YesYesYesMake a phone call
PythonFlash LiteJava ME
38 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Platform capability access
YesNoNoSymbian e32db
Yes(zoom, flash, etc.)
NoYes (MMAPI, JSR-135)
Camera
YesNoNoText-to-speech
YesNoYes (JSR-75)PIM
YesNoYes (JSR-75)File System
NoNot SVG but graphics are based on vector graphics
Starting from 3rd Edition FP1
SVG
YesNoYes (JSR-179)Locationing device
YesNo accessForms use mostly native UI elements
Native UI elements
PyS60Flash LiteJava ME
39 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Networking and connectivity
Yes (Bluetooth, IR)NoBluetooth (JSR-82), IR
Local connectivity
YesYesNoGet network connect status
Socket, HTTP, HTTPS
FL1.1: HTTP/HTTPS
FL2.1: + Sockets
Socket, HTTP, HTTPS
Connection types
YesNo (system)No (system)APN control
PythonFlash LiteJava ME
40 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Start and launch features
User, Phone start-up
UserUser, SMS/MMS, Bluetooth
Starting the app
Any appNoBrowser (WAP on 3rd Ed), Phone, RealPlayer
Launching other applications
PythonFlash LiteJava ME
41 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Performance
• No single cross-platform performance metrics available
• Java ME• JBenchmark
• FPC Bench
• SPMark Java JSR 184
• Flash Lite• FPS_speedometer
• Device Central CS3
• Python• pystones
42 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Extensibility
• Java ME• No JNI
• Extensions using sockets (“MIDPJNI”)• Native application on the background feeding data through socket
• Flash Lite• No direct extensibility
• Flash Lite 1.1 & 2.0 - Local HTTP server
• Flash Lite 2.1 - sockets
• Python• Extension framework allowing C++ extensions
• .pyd modules
43 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Application Packaging / Distribution
S60 3rd Edition -> SIS file has to be signed
Not required, but recommended (Verisign, Thawte, Java Verified)
Signing
Yes (e.g. NMIT)Yes (e.g. NMIT)Yes (e.g. NMIT)DRM
SIS (py2sis or py2sisng + ensymble or genaif&makesis or GCC&zlib)
SIS (SWF2Go, SWF2SIS, C++ SDK)
JAR & JAD (most Java ME tools have this)
Packaging
SVGSVGPNG (some challenges)
Application icons
PythonFlash LiteJava ME
44 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Security of applications
• Java ME• Uses it own security framework
• Not dependent of Symbian Platform Security
• Flash Lite and Python• S60 pre-3rd Edition – not much to worry
• S60 3rd Edition and further• Stand-alone app has to be signed to get the required capabilities
• Capabilities of the script depend on the capabilities of the script environment
45 © 2005 Nokia V1-Filename.ppt / yyyy-mm-dd / Initials
Company Confidential
Java API Security – API groups (MIDP 2.0 untrusted MIDlet)
--defaultyescall control
--defaultyesrestricted messaging
-yesdefaultyeslow level net access
--defaultyesphone call
---defaultSIM/Smart card
---defaultAuthentication
-yesdefaultyesLandmarks
-yesdefaultyesPositioning
--defaultyesEdit user data
--defaultyesRead user data
-yesdefaultyesMultimedia
yesyesdefaultyesConnectivity
yesdefaultyesApp auto start
--defaultyesMessaging
-yesdefaultyesNetwork access
Always allowed
Ask first timeAsk alwaysNo access