×
Namespaces

Variants
Actions

Nokia UI API 1.1b

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Compatibility
Platform(s):
Series 40
Article
Created: Grandlu (07 Sep 2010)
Last edited: hamishwillee (13 Aug 2013)

Contents

Overview

The main purpose of the Nokia UI API is to offer MIDlets specialized features that are not available in any existing API, including MIDP 2.0 / 2.1.

The support for Nokia UI API features on a given device depends on the Nokia UI API version the device uses. To find out which Nokia UI API version is supported on a specific device model, see the Nokia Developer Device Specifications.

Note.pngNote: The com.nokia.mid.ui.version system property to determine the Nokia UI API version on a device is currently supported only on Symbian devices. Series 40 devices do not support it.

Series 40 6th Edition Feature Pack 1 introduces Touch and Type UI and comes with the Nokia UI API in its 1.1b version -now providing support for the following features:

  • Gesture API and Frame Animator API
  • LCDUIUtil support for setting the touch editing style for Form Items
  • LCDUIUtil support for defining how an unfocused CustomItem behaves when touched
  • AudioOutputControl
  • TextEditor and CanvasGraphicsItem
  • Clipboard


More about Nokia UI API 1.1b and changes between platform releases on Nokia Developer Java Developer's Library (Java Developer's Library > Developer's Guides > UI and graphics > Nokia UI API > Changes between platform releases)


Gesture API and Frame Animator API

The Gesture API enables recognition of specific touch gestures like drag and flick by making the platform’s gesture recognition engine available to MIDlet.

The FrameAnimator API calculates motion interpolation for kinetic scrolling and linear animations. This can be used, for example, to implement list scrolling in response to a flick or drag gesture, enabling quick traversal of long lists. Like Gesture API, FrameAnimator API uses the platform logic to control the scrolling of UI components.

Using those two APIs will allow you to simply create touch UI applications with enhanced user experiences, consistent with the platform native's.

Getting started with the Gesture API & FrameAnimator API

More about touch interaction in Series 40 on Nokia Developer Java Developer's Library (Java Developer's Library > Developer's Guides > UI and graphics > Touch UI > Touch interaction in Series 40):

More about Gesture API on Nokia Developer Java Developer's Library (Java Developer's Library > Developer's Guides > UI and graphics > Touch UI > Touch interaction in Series 40 > Using gestures)

More about Frame Animator API on Nokia Developer Java Developer's Library (Java Developer's Library > Developer's Guides > UI and graphics > Touch UI > Touch interaction in Series 40 > Creating drag and scroll animations)


LCDUIUtil

LCDUIUtil is a utility class which provides static methods that allow the caller to read and set value of "traits" associated with a given target object. Each "trait" corresponds to an attribute or property, which is parsed and understood by the target object.

The getter and the setter of this API currently allow you to access two different "traits" in Series 40 touch UI devices:

  • Trait: "nokia.ui.s40.item.substate", to control whether inline or sub-state screen editing style is used in editable form items (e.g. DateField, TextField and Gauge)
  • Trait: "nokia.ui.s40.item.direct_touch", to control whether a given CustomItem instance will receive touch events without having to be set as current (selected) first.

How to use the LCDUIUtil API

More about LCDUIUtil on Nokia Developer Java Developer's Library (Java Developer's Library > Javadocs > Nokia UI API Appendix > Nokia UI API Appendix: LCDUIUtil)

AudioOutputControl

Using the AudioOutputControl extension, MIDlets can override the default audio routing on the device and control which audio output is used to play back audio. MIDlets can thus use AudioOutputControl to define their own default routing for audio. Audio can be routed to the device loudspeaker or any audio peripheral connected to the device.

On Series 40 devices, AudioOutputControl is a global control. Setting the routing from one MIDlet affects all MIDlets. MIDlets that change the audio routing must set it back to the default before exiting. Note that, since the control is global and can therefore compromise device security, only MIDlets that run in the manufacturer or operator domain can use AudioOutputControl.

Getting started with the AudioOutputControl API

More about AudioOutputControl on Nokia Developer Java Developer's Library (Java Developer's Library > Developer's Guides > Multimedia > Controlling audio output):


TextEditor and CanvasGraphicsItem

TextEditor is a floating text editing user interface component that is used on top of LCDUI Canvas. TextEditor is similar to the standard LCDUI text editing components, TextField and TextBox. However, TextEditor is implemented with minimal decoration. The client application defines the colors for the editor and draws additional UI enhancements such as scroll bar if needed.

TextEditor floats on Canvas. It introduces the component CanvasGraphicsItem, which also floats on Canvas and can be used to present custom content on top of a TextEditor. It provides the same draw capabilities as Canvas.

Getting started with the TextEditor API


More about TextEditor on Nokia Developer Java Developer's Library (Java Developer's Library > Developer's Guides > UI and graphics > LCDUI > Using the LCDUI > TextEditor)

More about CanvasGraphicsItem on Nokia Developer Java Developer's Library (Java Developer's Library > Developer's Guides > UI and graphics > LCDUI > Using the LCDUI > CanvasGraphicsItem):


Clipboard

The Clipboard class is used to copy and retrieve a text string respectively to and from the system clipboard. You can copy a text string into the system clipboard within a MIDlet and retrieve it from the clipboard in another application, and vice versa.

However Series 40 devices do not support the copyFromClipboard method so only text export is currently possible.

More about Clipboard on Nokia Developer Java Developer's Library (Java Developer's Library > Developer's Guides > UI and graphics > Nokia UI API > Using Nokia UI API > Clipboard)

This page was last modified on 13 August 2013, at 10:55.
62 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×