The Series 40 Touch UI phones support MultipointTouch events.


Interface Summary
MultipointTouchListener This interface is used by applications which need to receive multipoint touch events from the implementation.

Class Summary
MultipointTouch MultipointTouch class provides access to data and configuration related to the multiple touch points.

Package Description

The Series 40 Touch UI phones support MultipointTouch events.

The system property can be used to determine version of the Nokia Multipoint Touch API.

A MIDlet can use the MultipointTouchListener interface to receive multi-touch events from the platform. By implementing the interface the MIDlet is informed about all pointers that have changed (pressed, moved or released).

The MultipointTouchListener interface uses the Observer design pattern. To use this API MIDlets must implement MultipointTouchListener. This defines a listener for the MultipointTouch event notifications. The pointersChanged method receives an array of pointer Ids for all changed pointers.

The MultipointTouch class keeps track of all fingers in the touchpad. e.g. if middle and index finger were previously pressed down and end user moves index finger then only the movement of the index finger is notified through MultiTouchListener. A MIDlet can use MultipointTouch class to get the state and x- and y-coordinates of each pointer at any given time, not only in pointersChanged method.

 public void pointersChanged( int[] pointerIds ){
    int pointerId;
    int x;
    int y;
    int state;

    // Go through the array
    for(int i=0; i < pointerIds.length; i++){

        // Get pointerId.
        pointerId = pointerIds[i];

        // Read the pointer state.
        state = MultipointTouch.getState(pointerId);

        // Read the pointer X and Y coordinate.
        x = MultipointTouch.getX(pointerId);
        y = MultipointTouch.getY(pointerId);

            case MultipointTouch.POINTER_PRESSED:
                // A new finger was pressed.

            case MultipointTouch.POINTER_DRAGGED:
                // An existing finger was moved.

            case MultipointTouch.POINTER_RELEASED:
                // An existing finger was lifted.



Copyright © 2012 Nokia Corporation. All rights reserved.

Nokia is registered trademark of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Oracle Corporation. Other product and company names mentioned herein may be trademarks or trade names of their respective owners. This document is confidential information of Nokia Corporation.

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. Furthermore, information provided in this document is preliminary, and may be changed substantially prior to final release.

Nokia Corporation disclaims all liability, including liability for infringement of any proprietary rights, relating to this document and implementation of any information presented in this document.

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

Subject to above disclaimer, a license is hereby granted to use this documentation solely under existing Limited License Agreement and non-disclosure agreement between the companies for the agreed application development for Series 40 Nokia phones. No other licenses e.g. to any intellectual property rights are granted herein. Any use of the screen shots of this documentation, including any icons thereof, is subject to Nokia's prior written approval.