Hi
I have a 5800 Xpress and TactileFeedback class works fine.
I tried the same midlet (built with 5th Edition) in 3rd edition devices E71 and E90 and an unhandled exception occurs. From JaveME 3.0 library documentation the two calls to create the object and check if touch feedback supported should not throw exceptions. What could be the problem?
Thanks.
This code reproduces the problem. Build with 5th Edition SDK v0.9, and install midlet on Nokia E71 or E90.
Code:/* * To change this template, choose Tools | Templates * and open the template in the editor. */ import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import com.nokia.mid.ui.TactileFeedback; /** * @author nicholso */ public class TacFeedback extends MIDlet { private TactileFeedback tactileFeedback = null; public void startApp() { // this try catch block does not handle the exception try { tactileFeedback = new TactileFeedback(); if (tactileFeedback != null ) { if (!tactileFeedback.isTouchFeedbackSupported()) { // set to null - tactile feedback is not supported. tactileFeedback = null; } } } catch ( Exception e ) { // set to null - tactile feedback is not supported. tactileFeedback = null; } } public void pauseApp() { } public void destroyApp(boolean unconditional) { notifyDestroyed(); } }

Reply With Quote


