Java Developers Guide v1 1 En

42

Transcript of Java Developers Guide v1 1 En

Page 1: Java Developers Guide v1 1 En
Page 2: Java Developers Guide v1 1 En

Java Developer’s Guide 2

Table of contents 1. Nokia and Java technology 4

1.1 What is Java Platform, Micro Edition? 4 1.2 What is the Series 40 platform? 5 1.3 Creating Java applications for Nokia devices 6 1.4 Java technology in the Series 40 platform: A commitment from Nokia 6

2. The Series 40 platform 8 2.1 Platform architecture 8 2.2 Platform versions 10

2.2.1 Latest release 10 2.2.1.1 User interface 11 2.2.1.2 Java APIs 11

2.3 User interface 11 2.3.1 Touch and Type UI user experience 12 2.3.2 More information 12

2.4 Java API support 12 2.4.1 PDA Optional Packages for the J2ME™ Platform (JSR-75) 13 2.4.2 Java™ APIs for Bluetooth (JSR-82) 13 2.4.3 Wireless Messaging API (JSR-120) 13 2.4.4 Mobile Media API (JSR-135) 14 2.4.5 J2ME™ Web Services Specification (JSR-172) 14 2.4.6 Security and Trust Services API for J2ME™ (JSR-177) 15 2.4.7 Location API for J2ME™ (JSR-179) 15 2.4.8 Mobile 3D Graphics API for J2ME™ (JSR-184) 15 2.4.9 Wireless Messaging API (JSR-205) 16 2.4.10 Content Handler API (JSR-211) 16 2.4.11 Scalable 2D Vector Graphics API for J2ME™ (JSR-226) 16 2.4.12 Advanced Multimedia Supplements (JSR-234) 17 2.4.13 The Nokia UI API 17

2.5 Summary of Java™ API support 18 2.5.1 More information 19

2.6 Series 40 devices 20 3. Creating and distributing Series 40 apps 21

3.1 Prototyping 21 3.2 Development approach 22

3.2.1 Interface programming basics 22 3.2.1.1 Coding options 22 3.2.1.2 Screen size considerations 23 3.2.1.3 Keyboard controls 23 3.2.1.4 Touch and Type UI 23 3.2.2 Application architecture 26 3.2.3 Targeting Series 40 platforms 26

3.3 Tools and SDKs for Java™ development 27 3.3.1 SDKs 27 3.3.2 Java™ IDEs 27 3.3.3 Series 40 on-device debugger 28

Page 3: Java Developers Guide v1 1 En

Java Developer’s Guide 3

3.3.4 Other tools 28 3.4 Distributing and promoting your app 28

3.4.1 Ovi Store 28 3.4.2 Becoming an Ovi Store publisher 29 3.4.3 Submitting apps to Ovi Store 29 3.4.4 Your revenue 30 3.4.5 Promoting your application 30 3.4.6 Reach globally, act locally 31

4. Apps showcase 32 4.1 Shazam 32 4.2 Snaptu 33 4.3 Farm Frenzy 33 4.4 Locago 34

5. Forum Nokia 35 5.1 Forum Nokia services and resources 35

5.1.1 Design 35 5.1.2 Develop 35 5.1.3 Distribute 36 5.1.4 Devices 37 5.1.5 Library 37

5.2 The developer community 38 5.2.1 Discussion boards 38 5.2.2 Wiki 38 5.2.3 Blogs 38 5.2.4 Projects 38 5.2.5 Champions 39

5.3 Forum Nokia membership options 39 5.3.1 Public 39 5.3.2 Registered 39 5.3.3 Launchpad 39 5.3.4 Forum Nokia Pro 40

6. References 41

Change history 14 February 2011 1.0 Initial document release

3 March 2011 1.1 Updated to include information on Series 40 On-Device Debugger

Page 4: Java Developers Guide v1 1 En

Java Developer’s Guide 4

1. Nokia and Java technology Nokia is the world’s largest supplier of mobile devices. Nokia supplies mobile devices in two categories: smartphones and mobile phones. Smartphones offer users advanced computer like features, while mobile phones provide a rich environment for basic computer like activities.

Smartphones, powered by Symbian; the Maemo platform; and MeeGo, offer developers the ability to create mobile applications using the Qt framework and web technology. For mobile phones, powered by the Series 40 platform, developers have access to web and Java™ technology. These development technology options offer developers effective and efficient ways to create apps for consumers, globally.

This document looks at all aspects of the offering made by Nokia to Java developers, from the Java technology support in Series 40 through tools and development processes to distributing apps. A showcase of Java applications is provided as well, along with an introduction to the full range of resources and services offered by Forum Nokia

The use of the Java language for application development opens up access to five hundred million Nokia device owners worldwide. This is an unprecedented opportunity to build a mobile applications business: This guide will show you how.

1.1 What is Java Platform, Micro Edition? Java™ Platform, Micro Edition (Java ME) [formerly known as Java 2 Platform, Micro Edition (J2ME)] is a version of

the Java platform optimised for use on a wide range of embedded systems, with use in mobile devices being the

most common.

Implementations of Java ME are defined by configurations, which determine the basic set of libraries and virtual-

machine features offered, and a profile, which is a set of APIs that provide a complete Java application

environment. In addition, APIs defined by a Java Specification Request (JSR), created through the Java

Community Process, may be implemented to enable specific tasks, such as accessing contact details or rendering

3D graphics.

Nokia devices implement the Connected Limited Device Configuration (CLDC) 1.1 (JSR-139) and the Mobile

Information Device Profile (MIDP) (JSR-118), with up to 12 JSRs providing additional APIs. In addition, the Nokia

UI API is provided to provide developers with access to enhanced UI features, such as those for gesture

recognition and UI animation for the Touch and Type UI of Series 40 6th Edition, Feature Pack 1.

Java ME offers developers the familiarity of the Java language and the ability to use their skills — possibly

portions of desktop applications also — to create mobile applications. The range of APIs offered on Nokia

Page 5: Java Developers Guide v1 1 En

Java Developer’s Guide 5

devices enable applications to take advantage of stored information, such as contacts and calendar records, and

device features, such as SMS messaging and wireless communications. In addition, the increasing power of

mobile devices is used to good advantage with APIs for 3D graphics and cryptographically secured

communications, among others.

For developers who have created Java applications for the desktop, Java ME provides a familiar environment for

mobile apps development. Not only is the language familiar, but much of the toolset is also, with support for

development provided by Nokia for the NetBeans and Eclipse IDEs.

Java ME on Nokia devices opens up wide horizons to Java developers: The ability to create applications for

consumers and businesses alike and, as will be discussed later, take those applications to market through

effective distribution channels.

1.2 What is the Series 40 platform? The Series 40 platform is an operating system and collection of software used to create mass-market mobile

phones. Using a platform approach enables Nokia to deliver sophisticated features to both users and developers.

For users this means that even low-end devices can offer a wide range of built in software options, making

devices appealing and functional. For developers, the platform approach means an extensive collection of APIs

with common implementations. This largely eliminates the need for multiple builds of an application to address

the fragmentation that can be seen between devices offered by

other manufacturers.

A result of the platform approach is that there are some 500 million Series 40

devices in use in the world today that developers can target with Java applications.

This platform approach enables Nokia to offer innovations in a cost effective

manner to the widest audience globally. A recent example of this is the Touch and

Type UI. This new UI paradigm combines the best features of a touch screen — for

interacting with the devices software — and the convenience of a UTI keypad for

dialling and predictive text entry for messaging and social networking. Introduced

in Series 40 6th Edition, Feature Pack 1 and implemented in the Nokia X3-02 Touch

and Type (see Figure 1) and the Nokia C3-01 Touch and Type, this UI innovation is

already available to consumers globally.

It’s worth noting that Series 40 devices will continue to be a significant part of the device portfolio offered

by Nokia.

The characteristics of the Series 40 platform are described in full in Chapter 2, ‘The Series 40 platform’.

Figure 1: The Nokia X3-02 Touch and Type device

Page 6: Java Developers Guide v1 1 En

Java Developer’s Guide 6

1.3 Creating Java applications for Nokia devices Creating Java applications for Series 40 is straightforward for any developer with Java language skills.

Development will however need to take into account the unique aspects of mobile devices. Among these factors

designing for the relatively small screens and either keyboard or touch screen interaction are among the most

significant items developers will need to consider. To assist with designing applications for mobile devices Nokia

makes available Flowella (nokia.ly/Flowella), a tool that uses images of screen designs to enable the creation of

an interactive prototype that can be run on Series 40 devices. Using Flowella designers and developers can

validate an application’s UI without writing a line of code.

When it comes to coding, Nokia provides an SDK for each Edition and Feature Pack

of the Series 40 platform. Each of the SDKs includes documentation, the APIs, and

an emulator. The emulator, as shown in Figure 2, enables applications under

development to be run on a PC, mimicking the way they would run on a physical

device. This simplifies testing and debugging of applications. Furthermore, the

SDKs are designed to integrate with the NetBeans and Eclipse IDEs, meaning the

majority of developers will be able to create Series 40 applications using the tools

with which they are already familiar.

Once an application has been written and tested, Nokia offers developers Ovi Store

as a quick and convenient route to market. After signing up (for the princely sum of

1 euro) developers submit applications that, if they pass the QA process, are signed

and made available in Ovi Store. This channel gives developers access to

approaching 500 million consumers worldwide.

The approach to development, tools available, and use of Ovi Store to distribute

Java applications is explored fully in Chapter3, ‘Creating and distributing

Series 40 apps’.

It’s worth noting that you have the opportunity to deliver Java applications to

Symbian devices also. More details on this option can be found by visiting the Forum Nokia website or

contacting your local Forum Nokia representative.

1.4 Java technology in the Series 40 platform: A commitment from Nokia

The mobile device world has evolved rapidly over the last few years. This may be creating uncertainty for some

developers, particularly as many new platforms no longer provide support for Java development. During 2010

Nokia made a clear commitment to the use of Java as the ‘native’ development option for Series 40 devices. As

Figure 2: The Series 40

SDK emulator running a

MIDlet.

Page 7: Java Developers Guide v1 1 En

Java Developer’s Guide 7

part of this commitment Nokia will continue to work to minimise fragmentation (by optimising the platform

approach), provide additional Java APIs that will enable richer applications, enhance the user interaction with

apps through UI innovations, and expand the depth of tools coverage. In doing so, Nokia will enable developers

to fully exploit the potential of existing and forthcoming Series 40 devices.

Page 8: Java Developers Guide v1 1 En

Java Developer’s Guide 8

2. The Series 40 platform The Series 40 platform is an operating system and collection of software used to create mass-market mobile phones. Using a platform approach enables Nokia to provide sophisticated features to both users and developers.

In this chapter the key characteristics of the Series 40 platform are described. This covers the platform architecture, the UI, and supported Java APIs. There is a brief discussion of the mobile phone models based on the Series 40 platform too.

2.1 Platform architecture An important characteristic of the Series 40 platform is the fact that it’s a platform. This approach, delivering

common technology to hundreds of millions of devices, has benefits to both users and developers. For users it

means that even low end devices can offer a wide range of built in software options, making devices appealing

and functional. For developers, the platform approach means common implementations of Java ME APIs. This

approach largely eliminates the need for multiple builds of an application to address the fragmentation that can

be seen between devices offered by other manufacturers. In addition, the platform approach means Series 40

devices are able to offer a very wide range of advanced Java APIs, to enable developers to build functionally rich

applications that offer outstanding user experiences.

This platform approach enables Nokia to offer innovations in a cost effective manner to the widest

audience globally.

Page 9: Java Developers Guide v1 1 En

Java Developer’s Guide 9

To gain a better understanding of the platform approach used in Series 40 it’s worth considering the platform’s

architecture, as shown in Figure 3.

Figure 3: The architecture of the Series 40 platform is shown.

The Series 40 platform architecture consists of the hardware (the device hardware, CPU, memory, and so forth);

the operating system, which provides fundamental services to the platform; and the Series 40 platform services

that consist of:

Series 40 applications — Functionality provided to the user, including:

Communication applications such as telephone, messaging, and internet browser.

Media applications such as image viewer, camera, music player, voice recorder, and FM radio.

Personal information manager (PIM) with calendar, tasks, and contacts applications.

Series 40 Java technology services — The Java technology implemented within the platform.

Adobe Flash Lite — An implementation of Adobe Flash Lite Player.

Finally there is the UI that provides a common set of UI components with defined behaviour. These components

can be used in a range of different screen orientations and resolutions, with user interaction provided through a

keyboard or a combination of keyboard and touch interface.

Page 10: Java Developers Guide v1 1 En

Java Developer’s Guide 10

2.2 Platform versions The Series 40 platform is delivered in editions and feature packs, each of which may be delivered in a

Lite version.

Changes in Edition occur when there is a major change in the underlying technology of the platform, such as the

introduction of MIDP 2.1 support in Series 40 5th Edition.

Feature packs provide for an incremental change that builds on the features of an edition, such as the

introduction of the Touch and Type UI in Series 40 6th Edition, Feature Pack 1.

Lite versions of an edition provide for the creation of more cost effective phone models and generally provide a

subset of the edition and feature pack’s APIs, often with a lower resolution screen. For example, when compared

to Series 40 6th Edition, devices based on the Lite version offer 128 x 160-pixel displays and lack the Location

API for J2ME™ (JSR-179) among others.

The versions of the Series 40 platform shipped to date are:

Series 40 6th Edition, Feature Pack 1.

Series 40 6th Edition (Lite).

Series 40 6th Edition.

Series 40 5th Edition, Feature Pack 1 Lite.

Series 40 5th Edition (Lite).

Series 40 5th Edition.

Series 40 3rd Edition, Feature Pack 2.

Series 40 3rd Edition, Feature Pack 1.

Series 40 3rd Edition.

Series 40 2nd Edition.

Series 40 1st Edition.

2.2.1 Latest release Series 40 6th Edition, Feature Pack 1 is the latest release of the Series 40 platform; it introduces a new UI

paradigm and additional features to the supported Java APIs.

Page 11: Java Developers Guide v1 1 En

Java Developer’s Guide 11

2.2.1.1 User interface

The major new UI component of Series 40 6th Edition, Feature Pack 1 is the Touch and Type UI. However there

are other UI improvements, such as simplified security prompts that have been achieve through the

implementation of a more permissive security policy.

2.2.1.2 Java APIs

The following additions or improvements have been made to the Java APIs support in Series 40 6th Edition,

Feature Pack 1:

Nokia UI API 1.1b provides additional APIs for creating and controlling Touch and Type UI interactions.

Advanced Multimedia Supplements (JSR-234) — support for the CameraControl, SnapshotControl,

FlashControl, FocusControl, and ZoomControl APIs is provided.

2.3 User interface The Series 40 platform UI style represents an evolution of the popular two-softkey UI introduced by Nokia in

1994. Using the simple but effective list-driven paradigm shown in Figure 4, the Series 40 UI style is optimised

for use on compact devices with main displays of 128 x 160 pixels or 240 x 320 pixels. Other key features include:

Support for high-quality colour screens.

Context-sensitive icons.

Enhanced photorealism effects.

Support for smooth-state transitions during UI navigation.

Figure 4: The Series 40 UI style provides users with a simple, intuitive way to interact with their device’s functionality.

Page 12: Java Developers Guide v1 1 En

Java Developer’s Guide 12

2.3.1 Touch and Type UI user experience The most recent innovation in the Series 40 UI is the introduction of the Touch and

Type UI, as part of Series 40 6th Edition, Feature Pack 1. Designed for one handed

use, the Touch and Type UI combines touch interaction — for navigating the UI —

and keypad input — for entering and editing text, see Figure 5. Because this UI is

implemented on the Series 40 platform, it brings touch devices to a broader range

of mobile consumers. For Java developers the Touch and Type UI opens up new

possibilities for application interaction and usability through additional APIs

provided as part of the Nokia UI API. These APIs are:

Gesture API, to capture taps, long presses, repeated long presses, dragging,

dropping, and flicking gestures.

FrameAnimator API that calculates motion for kinetic scrolling and

linear animations.

TextEditor API that enables direct text entry in Java applications.

More information on the APIs is provided in Chapter 3.2.1.4, ‘Touch and Type UI’.

It’s worth noting that existing Java applications designed for QVGA screens will work on Series 40 6th Edition,

Feature Pack 1 devices. The only change that may be required is to modify controls to enable their comfortable

use with a thumb.

2.3.2 More information Detailed information on the Series 40 UI style can be found in the Series 40 UI Style Guides (nokia.ly/gLBQvX),

which are available under the Documentation tab (nokia.ly/ejYtE7) of the Develop Java section of the Forum

Nokia website. It’s recommended that some familiarity with these guides is achieved before commencing UI

design and development, as they provide definitive information on the UI styles found on Series 40 devices.

2.4 Java API support The core of the Java technology support in the Series 40 platform is the Connected Limited Device Configuration

1.1 (JSR-139) specification, and the Mobile Information Device Profile (JSR-118) extension to this specification.

To these basic specifications a number of JSRs and the Nokia UI API have been added.

Early versions of the platform provided support for the Java™ Technology for the Wireless Industry (JTWI)

(JSR-185) specification. Series 40 5th Edition and later (but excluding Lite implementations) support the Mobile

Service Architecture (JSR-248), which is designed to reduce Java fragmentation by defining a consistent set of

Figure 5: The Touch and Type UI brings a new dimension to the Series 40 UI.

Page 13: Java Developers Guide v1 1 En

Java Developer’s Guide 13

Java technologies for high-volume mobile devices. The subset encompasses JSR-75, JSR-82, JSR-118, JSR-135,

JSR-184, JSR-205, and JSR-226.

This section provides a detailed description of the Java APIs available in the Series 40 platform, along with

information on the versions of the platform that support these APIs.

2.4.1 PDA Optional Packages for the J2ME™ Platform (JSR-75)

Features

The implementation of PDA Optional Packages for the J2ME™ Platform (JSR-75) provides

support for the FileConnection (FC) and Personal Information Management (PIM) APIs.

These APIs enable applications to access calendar, contact, and to-do records, as well as

the file system, to accomplish tasks such as saving e-mail attachments.

Availability Series 40 3rd Edition and later.

Series 40 5th Edition, Feature Pack 1 and later provide support for the video_URL

contact field.

2.4.2 Java™ APIs for Bluetooth (JSR-82)

Features Java™ APIs for Bluetooth (JSR-82) enables applications to exploit Bluetooth connectivity.

Standard Bluetooth protocol RFCOMM, Service Discovery, and (in more recent editions) the

OBEX protocol are supported.

Availability Series 40 2nd Edition and later provide support for v1.0 (excluding OBEX support).

Series 40 5th Edition and later provide support for v1.1 (including OBEX support).

Not provided on ‘Lite’ devices and other devices that lack Bluetooth hardware.

2.4.3 Wireless Messaging API (JSR-120)

Features Wireless Messaging API (JSR-120) provides for the sending and receiving of SMS messages,

although it has been superseded by Wireless Messaging API 2.0 (JSR-205).

Availability Series 40 2nd Edition and later.

Page 14: Java Developers Guide v1 1 En

Java Developer’s Guide 14

2.4.4 Mobile Media API (JSR-135)

Features

Mobile Media API (JSR-135) provides the ability to play back MIDI, tone, sampled audio,

Real Time Streaming Protocol (RTSP), and music-progressive sound files, as well as audio

mixing and audio-progressive upload. Support is provided for video also, including video-

progressive playback, and image rendering.

Availability

Series 40 2nd Edition with sound playback support for MIDI and tone sound files.

Series 40 3rd Edition and later provide sound, video, and image rendering.

Series 40 5th Edition, Feature Pack 1 and later provide for video-progressive playback and

audio-progressive upload, as well as audio mixing.

2.4.5 J2ME™ Web Services Specification (JSR-172)

Features

J2ME™ Web Services Specification (JSR-172) provides the XML Parser and Java API for XML-

Based Remote Procedure Calls (JAX-RPC) subset. XML file parsing includes support for

Simple API for XML (SAX) 2.0, XML namespaces, UTF-8 and UTF-16 character encoding, and

document type definition (DTD) validation. The JAX-RPC APIs enable applications to use

SOAP to access public and private web services.

Availability

Series 40 3rd Edition, Feature Pack 1 and Series 40 3rd Edition, Feature Pack 2 provide

support for the XML parsing package only.

Series 40 5th Edition and later provide support for the XML parsing package and

JAX-RPC subset.

Page 15: Java Developers Guide v1 1 En

Java Developer’s Guide 15

2.4.6 Security and Trust Services API for J2ME™ (JSR-177)

Features

Security and Trust Services API for J2ME™ (JSR-177) provides implementations of the

Application Protocol Data Unit (SATSA-APDU) and SATSA-CRYPTO optional packages. These

APIs enable applications that offer high levels of data security, with features such as

cryptographic APIs, digital-signature services, and user credential management.

Availability

Series 40 3rd Edition, Feature Pack 2 provides support for the SATSA-APDU package only.

Series 40 5th Edition and later provides support for SATSA-APDU and SATSA-CRYPTO

optional packages.

Not provided in Lite devices.

2.4.7 Location API for J2ME™ (JSR-179)

Features

Location API for J2ME™ (JSR-179) provides features to acquire location information, listen

for changes in location, and identify proximity to a location using a GPS unit built into a

device or connected to a device over a Bluetooth connection. Included also are APIs to

create, update, and share landmarks. (The implementation excludes support for

getCompassAzimuth, getPitch, and getRoll of the Orientation class.)

Availability Series 40 6th Edition and later.

Not provided on Lite devices.

2.4.8 Mobile 3D Graphics API for J2ME™ (JSR-184)

Features Mobile 3D Graphics API for J2ME™ (JSR-184) provides features to create rich 3D graphics for

games, animated messages, custom UIs, and interactive product visualisation.

Availability Series 40 3rd Edition and later.

Page 16: Java Developers Guide v1 1 En

Java Developer’s Guide 16

2.4.9 Wireless Messaging API (JSR-205)

Features Wireless Messaging API (JSR-205) supports the sending and receiving of short message

service (SMS) and multimedia messaging service (MMS) messages.

Availability Series 40 3rd Edition, Feature Pack 1 and later.

Series 40 6th Edition and later provide cell broadcast service (CBS) message handling.

2.4.10 Content Handler API (JSR-211)

Features Content Handler API (JSR-211) enables MIDlets to be specified as the content handlers for

one or more specific file types, thereby enabling Java applications to handle multimedia

and web content seamlessly.

Availability Series 40 5th Edition, Feature Pack 1 and later.

Not provided in Lite devices.

2.4.11 Scalable 2D Vector Graphics API for J2ME™ (JSR-226)

Features

Scalable 2D Vector Graphics API for J2ME™ (JSR-226) provides for the rendering of scalable

2D vector images, including external images in Scalable Vector Graphics (SVG) format. The

principal uses for this API are in map visualisation, scalable icons, and applications that

require scalable and rich animated graphics.

Availability Series 40 5th Edition, Feature Pack 1 and later (as well as selected Series 40 3rd Edition

devices from the Nokia 6280 WCDMA/EDGE imaging phone).

Not provided in Lite devices.

Page 17: Java Developers Guide v1 1 En

Java Developer’s Guide 17

2.4.12 Advanced Multimedia Supplements (JSR-234)

Features

Advanced Multimedia Supplements (JSR-234) provides a range of additional multimedia

processing features. For audio these features include 3D audio and music support with

standard and 3D audio mixing that enables a rich sound experience for games and

multimedia applications. In addition, the APIs provide features to enable applications to

make use of a devices camera.

Availability

Series 40 5th Edition and later provides support for 3D audio and music support.

Series 40 5th Edition, Feature Pack 1 and later provide additional support for audio mixing,

including mixing of 3D audio.

Series 40 6th Edition, Feature Pack 1 and later provide additional support for

Camera features.

Not provided in Lite devices.

2.4.13 The Nokia UI API

Features

The Nokia UI API, provides an interface for advanced UI features, such as those of the

Touch and Type UI. More information on the APIs is provided in Chapter 3.2.1.4, ‘Touch and

Type UI’.

(Many features of the original implementation of Nokia UI API have been incorporated into

MIDP from MIDP 2.0 onward, but the original APIs are retained to offer applications

forward compatibility.)

Availability Series 40 1st Edition and later provide support for Nokia UI 1.0.

Series 40 5th Edition and later provide support for Nokia UI 1.1.

Series 40 6th Edition, Feature Pack 1 and later provide support for Nokia UI 1.1b.

Page 18: Java Developers Guide v1 1 En

Java Developer’s Guide 18

2.5 Summary of Java™ API support A summary of the Java™ technology features supported by the Series 40 platform is provided in Table 1.

Serie

s 40

1st

Editi

on

Serie

s 40

2nd

Editi

on

Serie

s 40

3rd

Editi

on

Serie

s 40

3rd

Editi

on, F

P 1

Serie

s 40

3rd

Editi

on, F

P 2

Serie

s 40

5th

Editi

on

Serie

s 40

5th

Editi

on, F

P 1

Serie

s 40

6th

Editi

on

Serie

s 40

6th

Editi

on, F

P 1

CLDC support 1.0 1.1 1.1 1.1 1.1 1.1 1.1 1.1 1.1 MIDP support 1.0 2.0 2.0 2.0 2.0 2.1 2.1 2.1 2.1 Nokia UI API 1.0 1.0 1.0 1.0 1.0 1.1 1.1 1.1 v1.1b PDA Optional Packages for the J2ME™ Platform (JSR-75)

PIM and FC

packages

PIM and FC

packages

PIM and FC

packages

PIM and FC

packages

PIM and FC

packages

PIM and FC

packages

PIM and FC

packages

Java™ APIs for Bluetooth (JSR-82)

v1.0, excluding

OBEX

v1.0, excluding

OBEX

v1.0, excluding

OBEX

v1.0, excluding

OBEX

v1.1 v1.1* v1.1 v1.1

Wireless Messaging API (JSR-120)

X X X X X X X* X

Mobile Media API (JSR-135)

Sound playback

Sound, video,

and image

rendering

Sound, video,

and image

rendering

Sound, video,

and image

rendering

Sound, video,

and image

rendering

Sound, video,

and image

rendering

Sound, video,

and image

rendering

Sound, video,

and image

rendering J2ME™ Web Services Specification (JSR-172)

XML parsing package

XML parsing package

X* X* X X

Security and Trust Services API for J2ME™ (JSR-177)

SATSA-APDU

package

SATSA-APDU and

SATSA-CRYPTO

packages*

SATSA-APDU and

SATSA-CRYPTO

packages

SATSA-APDU and

SATSA-CRYPTO

packages

SATSA-APDU and

SATSA-CRYPTO

packages Location API for J2ME™ (JSR-179)

X* X

Mobile 3D Graphics API for J2ME™ (JSR-184)

X X X X X* X X

Wireless Messaging API 2.0 (JSR-205)

X X X X X (with CBS)

X (with CBS)

Content Handler API (JSR-211)

X* X X

Scalable 2D Vector Graphics API for J2ME™ (JSR-226)

X X X* X* X* X

Page 19: Java Developers Guide v1 1 En

Java Developer’s Guide 19

Se

ries 4

0 1s

t Ed

ition

Serie

s 40

2nd

Editi

on

Serie

s 40

3rd

Editi

on

Serie

s 40

3rd

Editi

on, F

P 1

Serie

s 40

3rd

Editi

on, F

P 2

Serie

s 40

5th

Editi

on

Serie

s 40

5th

Editi

on, F

P 1

Serie

s 40

6th

Editi

on

Serie

s 40

6th

Editi

on, F

P 1

Advanced Multimedia Supplements (JSR-234)

3D audio and

music*

3D audio and

music*

3D audio and

music

3D audio, camera,

and music

Mobile Service Architecture (JSR-248)

subset* subset

Table 1: A summary of the Java technology supported by the Series 40 platform is provided. * May not be present in devices based on the Lite versions of the respective platforms.

2.5.1 More information Detailed technical descriptions of the APIs supported in the Series 40 platform, along with useful information,

such as implementation notes, is provided in the Java Developer's Library (nokia.ly/hiOu2A).

Page 20: Java Developers Guide v1 1 En

Java Developer’s Guide 20

2.6 Series 40 devices The Series 40 platform is designed to enable a wide range of devices with various form factors, as shown in

Figure 6. The features offered in these devices may vary from basic GPRS cellular radio network connectivity and

low resolution (VGA) cameras through to full HSDPA network and WiFi connectivity with high resolution cameras

and GPS.

Figure 6: Examples of Series 40 devices showing the varied form factors the platform supports.

The range of Series 40 devices is extensive. To see the range of devices, visit the Device Specifications page

(nokia.ly/hMqCz3) on the Forum Nokia website.

Page 21: Java Developers Guide v1 1 En

Java Developer’s Guide 21

3. Creating and distributing Series 40 apps

Java technology provides an easy route to creating mobile applications. However, creating great mobile applications requires Java developers to add some new capabilities to their toolkit: the skills of mobile UI design and achieving an optimal UX will be chief among these. One way to create a great mobile app UX is through prototyping.

Once a design has been created the application needs coding. In general good Java coding practices will serve developers well for Series 40 apps.

A good development technology is measured by the ease of use and robust performance of its development tools. Many Java developers are already familiar with either NetBeans or Eclipse and the good news is that Nokia leverages these tools to provide a complete environment for Series 40 applications development.

There are some 500 million Series 40 devices in use around the world that developers can create Java applications for. The majority of these devices are able to access Ovi Store directly, either using a device client or xhtml based browsing, or indirectly using the web based Ovi Store interface on a PC.

This chapter discusses all these aspects of apps for Series 40 devices.

3.1 Prototyping A useful technique to use as part of the design process is prototyping. By prototyping applications the UI and

basic interaction can be refined and confirmed with

users before the expense of coding is undertaken. To

enable prototypes to be built for Series 40 devices

Nokia provides Flowella (nokia.ly/Flowella). This tool

uses images of the application’s screens — which can

be scanned or photographed hand drawn sketches, or

wireframes and realistic screens created with a PC

drawing package — then enables interaction areas

and the connections triggered by these areas to other

screens to be defined, as shown in Figure 7. The result

can be exported to a Flash Lite application and run on

Figure 7: Flowella enables the rapid creation of prototypes from mocked-up screen images.

Page 22: Java Developers Guide v1 1 En

Java Developer’s Guide 22

a Nokia Series 40 device. This is an excellent way to determine if an application will “work” and can be

undertaken before a line of code is written.

3.2 Development approach This section provides an introduction to the way in which Java applications for Series 40 devices should be

written. More information can be found in the Java Developer's Library (nokia.ly/hiOu2A).

3.2.1 Interface programming basics In creating the application’s UI the key considerations are:

The limited screen size when compared to desktop applications.

The Series 40 UI style.

The method of interaction through a navipad or a combination of keypad and touch screen.

Simplification of user interaction by, for example, avoiding unnecessary security prompts.

3.2.1.1 Coding options

Java ME on Series 40 provides you with two primary options for creating an application interface: the high-level

UI widgets or a low level canvas, both provided by the javax.microedition.lcdui package.

Using the high-level controls applications take on the look-and-feel of the Series 40 platform. This approach has

the benefit of enabling third-party applications that look and feel the same as the standard device applications

the user is familiar with. Elements of all applications, such as settings, and many personal and business

applications will be served well by use of the high-level UI controls.

For games and any application that needs to provide a graphically rich interface, the Canvas may provide the

best implementation approach. Using the Canvas you have precise control over the content of the UI and are not

limited to the standard UI components.

In addition to the standard MIDP APIs for UI development the Nokia UI API is available also. Useful features of

the API include capturing gestures and controlling animation for the Touch and Type UI, a text editor, and the

ability to control custom font size for text drawn on the canvas.

In addition, another option for creating rich UIs is to use SVG in conjunction with the Scalable 2D Vector Graphics

API for J2ME™ (JSR--226).

Page 23: Java Developers Guide v1 1 En

Java Developer’s Guide 23

3.2.1.2 Screen size considerations

When creating applications for Series 40 devices, you need to consider screen size. Using a modular design

approach makes the process of optimising MIDlets to account for different screen sizes relatively straightforward.

Whether development starts with the smallest targeted screen size or the largest will depend on the graphic

content of the application. Developers of graphic-intensive applications, such as games, are advised to start with

the largest screen and then optimise the content to smaller screens. This approach is suggested because

graphics will probably use the largest amount of available storage for the MIDlet, so if the application works on

the largest screen, it should still do so for smaller screens, where the graphics size and memory requirements

are reduced.

Developers of more data- and function-oriented applications should start with the smallest targeted screen size

and then work toward the bigger screen sizes. This approach is suggested because it’s far easier to expand an

interface design into larger-screen real estate than to try to compress a design to a smaller screen.

Another aspect of flexible, adaptable applications is the avoidance of hard coding. Where possible, developers

should consider querying screen resolution and facilities such as automatic double buffering on initialisation

within the MIDlet, rather than hard-coding screen dimensions or capabilities.

3.2.1.3 Keyboard controls

MIDlets should be written to use the Java key-code constants, rather than hard coding the values of the buttons

to be used. This enables differences in devices’ navigation methods to be more easily accounted for. For

example, by using the fire key constant, the following key configurations will be interpreted as fire keys:

The [5] key, Send key, or middle softkey on a standard ITU-T keyboard.

The [6] key on a game cover.

The ninth key on the third row or the space bar on a full keyboard.

3.2.1.4 Touch and Type UI

When developing for the Touch and Type UI the only consideration that has to be made is to ensure that the UI

controls are sized appropriately for use with a thumb. Apart from that, all Series 40 Java application UIs for a

QVGA screen should work on Touch and Type devices.

Page 24: Java Developers Guide v1 1 En

Java Developer’s Guide 24

However, the Touch and Type UI includes a number of features, such as gestures, as

shown in Figure 8, and animated scrolling that you may wish to incorporate into

your application. To enable you to do this the Nokia UI API 1.1b provides some

new APIs:

Gesture API — this API enables applications to recognise specific touch

gestures the user can make on the device’s screen. These gestures include:

taps, long taps, repeated long taps, drag events, drop events, and flicks. By

using this API, third-party applications can offer the same rich interaction as

native Series 40 apps.

To use the Gesture API to detect one of the supported gestures, as shown in

Example 1, involves:

Listening to the gesture events.

Defining a GestureInteractiveZone and registering it as a gesture source.

Handling gesture events.

// To use the Gesture API, the package to gain access to the classes and interfaces needs // to be imported Import com.nokia.mid.ui.gestures // A class is defined that listens for the gesture events public class TouchCanvas extends GameCanvas implements GestureListener { … } // To implement GestureListener, the class needs to override handler function public void gestureAction(Object container, GestureInteractiveZone gestureZone, GestureEvent gestureEvent) { // Handle touch events } // Next the listener needs to be registered to GestureRegistrationManager GestureRegistrationManager.setListener(this, this); // Now a GestureInteractiveZone where the touch events will be generated by the user // is defined as a rectangle half the width and height of the screen in the top left // of the screen GestureInteractiveZone giz = new GestureInteractiveZone( GestureInteractiveZone.GESTURE_ALL ); giz.setRectangle(0, 0, getWidth()/2, getHeight()/2); // Then the zone needs to be registered to GestureRegistrationManager so that touch // events are directed to the gesture listening canvas

Figure 8: Touch and Type UI offer gestures that can be used in applications

Page 25: Java Developers Guide v1 1 En

Java Developer’s Guide 25

GestureRegistrationManager.register(this, giz);

Example 1: Basic handling of gesture events.

Frame Animator API — This API calculates motion interpolation for kinetic scrolling and linear animations

that can be used in response to drag and flick gestures. A typical usage example would be in enabling a

user to traverse a long list using a flick gesture. The Frame Animator API doesn’t draw the UI updates for

an animation; such animation should be created using the standard LCDUI methods for

rendering graphics.

To use the FrameAnimator API to gain the information to control an animation, as shown in

Example 2, involves:

Initialising the FrameAnimator class.

Registering FrameAnimatorListener with the instantiated FrameAnimator class.

Dispatching touch-events to FrameAnimator class.

Updating the coordinates of the UI component that is to be animated in the Class that implements

the FrameAnimatorListener update.

animator = new FrameAnimator(); animator.register(x, y, fps, pps, this); // FrameAnimatorListener interface’s method public void animate(FrameAnimator animator, int x, int y, short delta, short deltaX, short deltaY, boolean lastFrame) { //Do something with the values }

Example 2: Basic example of the frame animator APIs use.

LCDUIUtil — this utility class enables:

editable form items, such as DateField, TextField, and Gauge to be set so they provide the inline

or sub-state screen editing style

CustomItem instance to be set so it will receive touch events without having to be set as the current

(selected) item first.

TextEditor API — This is a floating text editing component that is used on top of the LCDUI Canvas.

TextEditor is similar to the standard LCDUI text editing components, TextField and TextBox. However,

unlike the standard components the client application defines the colours for the editor and draws

Page 26: Java Developers Guide v1 1 En

Java Developer’s Guide 26

additional UI enhancements. This is achieved using CanvasGraphicsItem, which floats on Canvas and

provides the same draw capabilities as Canvas.

To draw a TextEditor to the canvas, as shown in Example 3, involves:

Creating the editor with the createTextEditor method.

Adding the editor to Canvas by calling setParent.

Setting the position of the TextEditor.

Adding colours.

Setting the editor visible by calling setVisible(true).

texteditor = TextEditor.createTextEditor(100, TextField.ANY, 230, 1); texteditor.setParent(canvas); texteditor.setTextEditorListener(listener); texteditor.setPosition(5, 10); texteditor.setBackgroundColor(0xFFE8E89E); texteditor.setForegroundColor(0xFF000000); texteditor.setVisible(true);

Example 3: Basic example of adding a TextEditor to the canvas.

For more information on the APIs for Touch and Type UI see the Touch interaction in Series 40 section

(nokia.ly/gx72uY) of the Java Developer’s Library.

3.2.2 Application architecture You may want to create applications that are compatible with most devices in the Series 40 family, or target

specific devices because of unique technology extensions or served market segments. In either case, the most

effective development approach will be a design that separates the UI from the application logic layer and

follows a modular design philosophy.

3.2.3 Targeting Series 40 platforms While Series 40 6th Edition, Feature Pack 1 is the most recent version of the Series 40 platform versions, Nokia is

actively releasing devices based on Series 40 6th Edition. In addition, to maximise coverage it may be worth

considering optimising applications for Series 40 5th Edition and possibly Series 40 3rd Edition devices also.

You should be aware that there are some variations in the implementation of the Series 40 platform on specific

devices. These variations may be because of implementation anomalies or because a particular device uses

technology beyond the scope of the platform. These issues are documented in the Forum Nokia Knowledge Base

(nokia.ly/egBZed), which is housed in the Forum Nokia Wiki.

Page 27: Java Developers Guide v1 1 En

Java Developer’s Guide 27

3.3 Tools and SDKs for Java™ development This section provides information on the Nokia and third-party tools that provide for the development and

testing of Java applications for Series 40 devices.

3.3.1 SDKs To assist in the creation of Java applications, Forum Nokia makes available the Series 40 platform SDKs. These

SDKs contain MIDP APIs, classes, documentation, and sample applications, along with an emulator, as shown in

Figure 2 on page 6. The emulator, in addition to

enabling an application to be run and tested on a PC,

provides diagnostic information, including network

traffic and memory usage. Other emulator features

include security, the ability to run multiple instances,

and support for communications, XHTML and TCP

stacks, and multiple languages. More recent SDKs

provide tools for route simulation, see Figure 9to help

in the development of location-based apps.

SDKs are available for all editions and feature packs of

the Series 40 platform and can be obtained via the

Tools tab (nokia.ly/i6ZqJw) in the Forum Nokia website’s Develop Java section.

3.3.2 Java™ IDEs Integrated development environments (IDEs) can vastly speed up development time. Apart from application

packaging, they provide developers with a visualisation of the project with class and package navigation

facilities. The Series 40 SDKs are designed to work with the leading NetBeans and Eclipse IDEs.

Developers choosing NetBeans are able to take full advantage of the features of NetBeans with Java ME support.

NetBeans Java ME provides developers with a rich development environment offering the ability to specify

application-flow and UI component layouts visually using drag-and-drop techniques. In addition, NetBeans Java

ME offers tools to support the use of Scalable Vector Graphics Tiny (SVGT) in creating graphically rich UIs,

eliminating the overhead of low-level graphics coding.

Developers familiar with the Eclipse IDE may want to use Pulsar, which provides a set of tools for creating,

testing, and packaging MIDlets for mobile devices.

Nokia tools can be used in conjunction with other IDEs; however, developers will not be able to benefit from the

efficiencies afforded by the integration provided with the supported IDEs.

Figure 9: The SDK’s route editor makes testing location based apps easy.

Page 28: Java Developers Guide v1 1 En

Java Developer’s Guide 28

3.3.3 Series 40 on-device debugger The emulators supplied with the Series 40 SDKs enable developers to debug their Java applications on a PC.

However, occasionally issues — that didn’t occur in the emulator — may be found when running an application

on a device. In these cases or simply as a preference, developers can make use of the Series 40 On-Device

Debugger. This tool enables developers to launch applications over an IP or Bluetooth connection and then

control the applications execution with the NetBeans or Eclipse IDEs’ debugging tools.

The tools device client provides features to capture user level trace also, without the need for an IDE.

The Series 40 On-device Debugger is currently available as a beta release on Forum Nokia (nokia.ly/S40ODD) and

works with most of the most recent Series 40 devices.

3.3.4 Other tools As a developer you may also be interested in installing Ovi Suite (www.nokia.com/ovisuite). This tool is designed

to assist users with the synchronisation of PC and Ovi data with their device. However, for developers it’s useful

in simplifying the installation of software to a connected device.

3.4 Distributing and promoting your app The goal of almost every development project is to distribute the application to users. With Series 40 apps you

have the Ovi Store as an effective mechanism to distribute applications to hundreds of millions of

consumers worldwide.

3.4.1 Ovi Store Ovi Store provides developers with a direct to

consumer channel for free, advertising funded, and

paid applications. The store, which is implemented in

32 different languages, can be accessed in over 190

countries by hundreds of millions of Nokia device

owners, see Figure 10.

Figure 10: Ovi Store is available in over 195 countries

Page 29: Java Developers Guide v1 1 En

Java Developer’s Guide 29

The store is delivered as a client application on most new Series 40 devices. The

store client provides an easy-to-use UI, as shown in Figure 11, which enables

consumers to quickly locate apps that interest them. Where Ovi Store is not

available as a client app it can be accessed as a mobile website or from the owners

PC using any desktop browser.

For paid apps Ovi Store offers options for credit card and operator billing. Credit

card billing is available in over 170 countries, while operator billing is provided in

32 countries (through 103 operators). The significance of operator billing is that,

where it’s available, the number of applications purchased increases dramatically.

Nokia is also rolling out an in-apps purchasing mechanism that will enable, for

example, consumers to buy an application from within a demo version or purchase

additional game levels — without having to visit Ovi Store first. In addition, for

developers who wish to create advertising funded applications, an in-app advertising option is being rolled out

by Nokia too.

3.4.2 Becoming an Ovi Store publisher Becoming an Ovi Store publisher involves registering at publish.ovi.com, by clicking the Register Now button.

Registration is open to both companies and individuals for the payment of a one-off fee of 1 Euro.

3.4.3 Submitting apps to Ovi Store Once your application is ready for distribution the process of submitting it to Ovi Store is straightforward, you

simply log onto your publisher account; upload the app, images and description for use in the Ovi Store client;

identify in which countries you wish to sell the app (or simply publish globally); and the price at which it will

be sold.

There is no need to sign or obtain Java Verified for your app, as this is done by Nokia as part of the QA process.

You do, however, need to ensure your app will pass the Java Verified tests or it will be returned from the Ovi

Store QA process and will have to be resubmitted.

After you submit an app it passes through the QA process. This process checks that the information supplied is

complete and that the application passes basic suitability criteria, for example, if your application offers some

form of gambling feature it may not be legal in some countries. It’s important to note that Nokia doesn’t reject

applications because they may compete with something developed by Nokia. The only exception is where the

app contains an embedded payment option that would bypass Ovi Store.

Figure 11: The Ovi Store client on a Nokia X3-01 Touch and Type

Page 30: Java Developers Guide v1 1 En

Java Developer’s Guide 30

If your application passed the QA check it’s signed and made available to consumers in Ovi Store. Assuming

there are no issues identified in QA your application should be in Ovi Store five working days after submission,

although Nokia is working to shorten this period.

3.4.4 Your revenue For paid apps Ovi Store shares revenue with developers on a 70/30 split for credit card payments and 60/40 split

for operator billing. The difference in splits is due to the differences in underlying transaction cost. While credit

card transactions incur a small transaction fee, operator billing charges can absorb anything up to 90% of the

amount paid by the consumer. Rather than leave developers with the uncertainty of what revenue per app they

will receive from operator billing, Nokia chose to provide the 60/40 split.

It may seem that credit card billing offers the best opportunity for revenue generation, as a higher percentage of

the application price is returned. This may, however, not be the case. There are two factors that usually make

operator billing the most lucrative source of revenue:

Credit card ownership — every phone owner has an operator, not every phone owner has a credit card:

Credit cards are far from a universal method of payment. It might be expected that there will be low levels

of credit card ownership in emerging markets, but it’s true of some developed markets too. For example,

in Germany only 30% of the population has a credit card[1]. Also, younger consumers may not have access

to a credit card, which could affect those applications and services directed at this demographic.

Operator billing — is simple and trusted. The user doesn’t have to provide any additional information to

use operator billing, making a purchase much easier, and in general users trust their operator to bill

them correctly.

As a result, revenues from operator billing can exceed those from credit cards by a factor of ten; for every dollar

earned on credit card sales, ten could come from operator billing.

This may still present challenges if an application or service involves fixed costs, such as royalties for music. In

this case the best advice is to price the application based on operator billing sales.

3.4.5 Promoting your application Once your application is available in Ovi Store you will want to promote it to gain the maximum exposure

and downloads.

To assist with marketing on your own web properties Ovi Store provides the Promotional Banner Creator tool

(promotions.ovi.com/omt/). This tool enables the quick and easy creation of a web banner that can be used to

advertise an application’s availability in the Ovi Store. The banner provides a link to the application’s page on Ovi

Store too.

Page 31: Java Developers Guide v1 1 En

Java Developer’s Guide 31

In addition, it’s worth reviewing the advice provided in the Marketing your applications and Public relations

guidelines areas of the Distribute section (nokia.ly/fmG1sF) of the Forum Nokia website. The advice on the

Marketing your applications page covers how to create effective metadata, the information that describes your

application to Ovi Store and subsequently to users browsing the store. The Public relations guidelines area offers

some very useful advice on how to leverage social media to promote your application.

3.4.6 Reach globally, act locally While Ovi Store offers global distribution of your

applications, it’s worth pointing out that Nokia

recognises the importance of content that is relevant

to users within a country, see Figure 12. The

importance of local content is that it provides

relevance to a user’s device and complements more

generic global apps. For example, applications that

enable users to look up local transport time tables and

buy tickets can be lucrative, even though such apps

have minimal use outside a particular country. As a

result, Nokia is constantly on the lookout for outstanding local apps. Such apps could also benefit from local

promotion such as inclusion in device advertising, Ovi Store placement, physical in store promotions, preloading

on devices, and inbox literature.

Figure 12: Apps for Series 40 deliver locally relevant apps and content throughout the world

Page 32: Java Developers Guide v1 1 En

Java Developer’s Guide 32

4. Apps showcase The range of apps that can be created with Java technology for Series 40 devices is almost unlimited. This chapter looks at some examples of Series 40 apps that demonstrate the power and flexibility of Java technology on the Series 40 platform.

4.1 Shazam Music is engrained into the human psyche. People love to listen to their favourite

music anytime and anywhere. Series 40 devices offer users this ability and Java

technology enables developers to put music at the heart of their applications.

One of the pleasures of music is the ability to discover new songs and artists. There

is, however, nothing more frustrating that hearing something you like and being

unable to find out the song title and artist. This is where Shazam comes in.

When a new song is heard, the user captures a fragment of the song using Shazam.

The app then uploads the music fragment and compares it to a database of over

eight million tracks. Once this is done, the application then provides the user with

details of the music, such as artist and album. Shazam enables users to share

music, get recommendations for similar music, and view charts among

other features.

Shazam is included in the software shipped with many Series 40 devices.

Figure 13: Shazam enables its users to discover music

Page 33: Java Developers Guide v1 1 En

Java Developer’s Guide 33

4.2 Snaptu The social networking phenomenon has transformed the way people

communicate and stay in touch. Because of their market demographics, Series 40

devices are ideally placed to offer social networking functionality to their owners.

Snaptu provides a good example of how a third party developer has leveraged this

feature of Series 40. The Snaptu app, see Figure 14, enables users to quickly and

efficiently connect with their many social networks such as Twitter, Facebook,

Flickr, and Picasa as well as information sources such as news and weather. In

addition, Simon Davies, European MD for Snaptu, sees the Java technology version

as an ideal way to address emerging economies, saying they are ‘going to be a

very lucrative market. A lot of investors in the West don't understand the content

opportunity in emerging markets.’

Since its launch on Ovi Store the Java language version of Snaptu has been

downloaded over two million times.

4.3 Farm Frenzy Whether it’s occupying a few idle minutes with a

simple puzzle game or taking the time to become

immersed in a complex role playing game, Series 40

devices offer consumers an ideal platform for Java

games. The range of games for Series 40 devices is

extensive, but the consumer appetite for new game

playing experiences is greater.

Playing Farm Frenzy from HeroCraft, see Figure 15, the

user finds out how good they could be at running a

farm. The player is charged with looking after

chickens, sheep, and cows while producing cakes,

wool, butter, and cheese. Play ranges from simple

tasks, such as growing enough grass to feed geese and

collect eggs, through 48 increasingly challenging levels. Throughout this game offers fun and colourful graphics

and engaging game play for both casual and immersive play.

Farm Frenzy has helped HeroCraft — of Kaliningrad, Russia — achieve over five million downloads through

Ovi Store.

Figure 14: Snaptu enables users to quickly connect to media and their social networks

Figure 15: Series 40 owners can get to grips with life on the farm, with Farm Frenzy

Page 34: Java Developers Guide v1 1 En

Java Developer’s Guide 34

4.4 Locago Whether it’s being able to see their location on a map,

find out about their surroundings, or navigate to their

next destination, mobile consumers have taken to

location based services in a big way.

An increasing number of Series 40 phones are being

shipped with built in GPS and many others can take

advantage of GPS over a Bluetooth connection. This

makes Series 40 devices ideal for location

based applications.

Locago takes advantage of these capabilities to deliver

map, information, and routing features. The

application enables maps to be overlaid with information from social networking sites such as Flickr, as shown

in Figure 16, or information sources such as Wikipedia. In addition, the application is open for developers to add

custom layers.

Developed by Idevio AB — of Göteborg, Sweden — Locago has found considerable success in Ovi Store, with

over two million downloads in more than 200 countries.

Figure 16: Locago offers many layers of added value information, such as Flickr photos.

Page 35: Java Developers Guide v1 1 En

Java Developer’s Guide 35

5. Forum Nokia Forum Nokia is a portal provided by Nokia to support all developers creating applications and content for Nokia devices. But it’s also more than a place to find tools, documentation, and other resources to assist in apps development; Forum Nokia supports a vibrant community of developers. Many of the two million registered users of Forum Nokia regularly contribute to community resources, such as a wiki and the discussion boards.

5.1 Forum Nokia services and resources Forum Nokia provides a host of resources on its website that assist with all aspects of application creation. This

section describes these resources.

5.1.1 Design The Design section of Forum Nokia (forum.nokia.com/Design) is a repository of information built on the years of

experience Nokia has in mobile application design. For those new to development the Introduction to User

Experience (forum.nokia.com/ux) provides a helpful primer to good UI design. Once you get started, the User

Experience Checklist for Keypad (nokia.ly/gjfEWk) and User Experience Checklist for Touch (nokia.ly/e5iHqN) are

concise guides to creating applications with the Nokia look and feel.

Forum Nokia offers a couple of really useful user experience services (nokia.ly/fZXfJz) also. Developers with

serious mobile development ambitions should consider the User Experience Evaluation. This is a charged service

that provides an independent assessment of an application’s user experience, undertaken by a user experience

expert. The review delivers a report that can be used in guiding future development. No other manufacturer

offers a similar service.

An alternative or complementary approach is end user feedback, where Forum Nokia has partnered with

Mob4Hire (mob4hire.com). This company connects developers with users, from up to 150 countries. These users

are interested in testing and providing feedback on new or existing apps. Such testing needs to be well planned

to gain the most benefit, a starting point for such planning is provided in the Forum Nokia User Experience Test

Plan for End User Feedback (nokia.ly/eLZhWT) document.

5.1.2 Develop The Develop section of Forum Nokia (www.forum.nokia.com/Develop) is where you will find detailed

information on the three primary development technologies offered by Nokia: Qt, Web, and Java technology.

The Java section (www.forum.nokia.com/Develop/Java) provides pages containing:

Page 36: Java Developers Guide v1 1 En

Java Developer’s Guide 36

An overview of the Java technology offering, with spotlighted apps and developers, recent technology

highlights, and feeds of the latest resources and news for Java technology on Nokia devices.

A getting started guide that provides a quick and convenient introduction to Java ME development with

NetBeans and the Java tools from Nokia.

A listing of the tools available from Forum Nokia for Java development.

Access to Java related documents. These documents cover a wide range of topics related to

Java development.

A collection of code examples that provide definitive information of how to use many of the more

advanced APIs.

A snapshot of the community activity — in discussion boards, the wiki, and blogs — related to

Java technology.

The Develop section provides access to technical support also. Technical Support provides case-by-case solutions

to specific problems or answers to focused technical questions. Each request for technical support costs 170 EUR,

however members of the Forum Nokia developer programs are offered technical support cases at a discount

rate of 100 EUR per case (prices include VAT at 0%).

Through support, there is a facility to report bugs you believe you have found in the platform, which is free

of charge.

5.1.3 Distribute The Distribute section of Forum Nokia (www.forum.nokia.com/Distribute) provides detailed information on how

to prepare, submit, and market applications through Ovi Store. The section provides:

An overview to the Ovi Store distribution offering, with spotlighted apps and developers, recent

distribution services highlights, and feeds of the latest resources and news for app and

content distribution.

Access to the guidelines you will need to follow to sign up as an Ovi Store publisher and in submitting

apps for publication.

A wide range of statistics on Ovi Store, such as download rates, popular devices, and supported countries.

Detailed information on the packaging and signing requirements for apps submitted to Ovi Store.

Information on and access to the Ovi tools that can assist with marketing your application.

Advice on how to manage your apps marketing public relations, with advice on options such as social

media and tips on how to make the most of the opportunities they offer.

Page 37: Java Developers Guide v1 1 En

Java Developer’s Guide 37

5.1.4 Devices The Device section of Forum Nokia (http://www.forum.nokia.com/Devices) provides an overview of each of the

device platforms Nokia uses: the Series 40 platform, Symbian, and the Maemo platform. The Device

specifications section provides detailed information

for each device Nokia has announced. In addition to

providing information on the device features, a full list

of each device’s supported Java APIs is provided, as

shown in Figure 17.

In addition, it’s possible to select and compare up to

five different devices, a useful feature when planning

to migrate an application to a new device or platform

version. Should you want to find devices offering

certain features, such as a specific Java API, the Expert

device search will enable you to do so easily.

Another feature of the device section is a link to the

Remote Device Access (RDA) services. For Series 40

developers the charged Forum Nokia Virtual Developer

Lab and The Nokia Handset Cloud Service provide

access to Series 40 devices over the internet, which

may be useful for testing.

5.1.5 Library The Library section of Forum Nokia (www.forum.nokia.com/Library) brings together all the document and

media resources for Nokia platforms and supported technologies. The section includes:

Forum Nokia developer libraries, these libraries offer definitive reference information on the technologies

supported by Nokia and used in devices, of particular interest to Java developers will be:

Java Developer's Library (nokia.ly/hiOu2A).

Design and User Experience Library (nokia.ly/ghNpfw).

Learning materials that provides hands-on and class room style training presentations and workshops

that you can follow at your own pace.

Multimedia, which provides access to podcasts and webinars, which cover Java technology and

development regularly.

The library provides an alternative route to discovering tools, documents and code examples too.

Figure 17: Part of a typical device information page

Page 38: Java Developers Guide v1 1 En

Java Developer’s Guide 38

5.2 The developer community Forum Nokia is more than a website you can use to access the technical information and tools provided by

Nokia. The Community section of the Forum Nokia website (www.forum.nokia.com/Community/) provides a

vibrant virtual meeting place where developers interact and share information. As a result, each month the

community section delivers around two million page views.

5.2.1 Discussion boards The Forum Nokia discussion boards (discuss.forum.nokia.com) provide a forum for developers to ask questions

and share their experiences, with between two and three thousand new discussion threads added a month and

nine to twelve thousand messages posted. Each development technology has its own board, with sub boards for

specific areas, for example the Java technology board includes categories for tools and SDKs and media

among others.

When accessing the discussion boards it’s always worth searching them before asking a question, many

common and not so common development and technology questions already have answers posted.

5.2.2 Wiki With over 8000 articles, the wiki (wiki.forum.nokia.com) provides in-depth coverage on technology and mobile

apps development. The Java ME section alone has close to 1000 articles. The wiki is an excellent source of Java

code examples and snippets too.

The wiki includes the Forum Nokia Knowledge Base, a library of known issues, technical solutions, and

code snippets.

5.2.3 Blogs With regular articles from Nokia and Forum Nokia staff as well as Forum Nokia Champions, the Forum Nokia

blogs (blogs.forum.nokia.com) provide an engaging way to keep up with the latest trends and development in

mobile apps and content.

5.2.4 Projects Forum Nokia Projects (projects.forum.nokia.com) is a tool that enables developers to host and share projects,

either publicly or privately. Any registered Forum Nokia developer can create a project and then make details

such as source code, project wiki, timeline, and roadmap details available. Given the depth of experience

available in the Forum Nokia community, Projects is an ideal way to find developers and accelerate the

development of your project.

Page 39: Java Developers Guide v1 1 En

Java Developer’s Guide 39

5.2.5 Champions The Forum Nokia champions program (www.forum.nokia.com/Community/Champions/) provides recognition to

the members of the Forum Nokia community who make the most significant contributions. While becoming a

champion is an honour in its own right, champions get access to areas of Forum Nokia normally reserved for

selected companies and operators. They may receive complimentary accommodation to attend Nokia events

and passes to those events too. For example 31 people from 16 countries were invited to the 2010 Nokia

Developer Summit at Nokia World.

5.3 Forum Nokia membership options Forum Nokia offers a number of membership levels designed to suit developers needs.

5.3.1 Public Anyone can take advantage of public access to Forum Nokia. Unrestricted public access is provided to most of

the Forum Nokia website, documents, code examples, and some tools. The Discussion Boards and wiki can also

be viewed and searched.

5.3.2 Registered Registration provides additional features, including full access to tool downloads, the ability to post messages in

the Discussion Boards and articles in the wiki, as well as host and join projects.

5.3.3 Launchpad Part of the Developer Programs offered by Forum Nokia, Launchpad (nokia.ly/hzFnVF) provides developers with

a number of additional benefits that can help with app projects. Launchpad members gain:

Early and exclusive access to technical information, such as alpha and beta APIs and SDKs as well as

materials about forthcoming technology releases.

Access to the latest market intelligence and industry reports.

Access to the Discounted Devices Program to purchase Nokia devices for development and testing

purposes, for companies only.

Free Ovi publisher registration.

Opportunities to promote and merchandise applications and content in Ovi Store.

Invitations to key regional and global Nokia events and trainings.

Page 40: Java Developers Guide v1 1 En

Java Developer’s Guide 40

5.3.4 Forum Nokia Pro This is an invitation only program that provides developers with the closest working relationship with Nokia and

Forum Nokia.

Page 41: Java Developers Guide v1 1 En

Java Developer’s Guide 41

6. References [1] Statistics on payment and settlement systems in the CPSS countries - Figures for 2009 -

Preliminary release, CPSS Publications No 93, December 2010, Bank for International Settlements,

http://www.bis.org/publ/cpss93.htm

Page 42: Java Developers Guide v1 1 En

Java Developer’s Guide 42

Copyright © 2011 Nokia Corporation. All rights reserved.

Nokia and Forum Nokia are trademarks or registered trademarks of Nokia Corporation. Java and all Java-based

marks are trademarks or registered trademarks of Sun Microsystems, Inc. Other product and company names

mentioned herein may be trademarks or trade names of their respective owners.

Disclaimer

The information in this document is provided ‘as is’, with no warranties whatsoever, including any warranty of

merchantability, fitness for any particular purpose, or any warranty otherwise arising out of any proposal,

specification, or sample. This document is provided for informational purposes only.

Nokia Corporation disclaims all liability, including liability for infringement of any proprietary rights, relating to

implementation of information presented in this document. Nokia Corporation does not warrant or represent

that such use will not infringe such rights.

Nokia Corporation retains the right to make changes to this document at any time, without notice.

Licence

A licence is hereby granted to download and print a copy of this document for personal use only. No other

licence to any other intellectual property rights is granted herein.