×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    2

    Exception on vibration and backlight

    Hello!

    I have troubles using vibration and backlight control functions in a eSWT midlet. The problem is that after I create org.eclipse.swt.widgets.Display, I can no longer create javax.microedition.lcdui.Display; I have to use DeviceControl class.

    When I call any of:

    Code:
    DeviceControl.setLights(0, 100 );
    DeviceControl.setLights(0, 0 );
    DeviceControl.startVibra(50, 500);
    , I get exception(s):

    Code:
    java.lang.Error: SymbianOS error = -1 : General:
    System error (-1)
    	at com.symbian.util.NativeError.checkOOM(NativeError.java:161)
    	at com.symbian.epoc.events.MIDEventServer.openEventServer(MIDEventServer.java:84)
    	at com.symbian.epoc.events.MIDEventServer.<init>(MIDEventServer.java:62)
    	at javax.microedition.lcdui.UiEventServer.<init>(UiEventServer.java:17)
    	at javax.microedition.lcdui.Toolkit.initialize(Toolkit.java:179)
    	at javax.microedition.lcdui.Toolkit.ensureInitialized(Toolkit.java:134)
    	at javax.microedition.lcdui.Toolkit.getHandle(Toolkit.java:240)
    	at javax.microedition.lcdui.ToolkitInvoker.toolkitGetHandle(ToolkitInvoker.java:85)
    	at com.nokia.mid.ui.impl.DeviceControlImpl.<init>(DeviceControlImpl.java:78)
    	at com.nokia.mid.ui.impl.DeviceControlImpl.setLights(DeviceControlImpl.java:153)
    	at com.nokia.mid.ui.DeviceControl.setLights(DeviceControl.java:89)
    	at com.rovemobile.captest.s60.BacklightSwitcher.run(Unknown Source)
    	at com.rovemobile.captest.common.Repeater.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    Exception caught in finalizer: java.lang.Error: SymbianOS error = -1 : General:
    System error (-1)
    java.lang.Error: SymbianOS error = -1 : General:
    System error (-1)
    	at com.symbian.util.NativeError.checkOOM(NativeError.java:161)
    	at com.symbian.epoc.events.MIDEventServer.openEventServer(MIDEventServer.java:84)
    	at com.symbian.epoc.events.MIDEventServer.<init>(MIDEventServer.java:62)
    	at javax.microedition.lcdui.UiEventServer.<init>(UiEventServer.java:17)
    	at javax.microedition.lcdui.Toolkit.initialize(Toolkit.java:179)
    	at javax.microedition.lcdui.Toolkit.ensureInitialized(Toolkit.java:134)
    	at javax.microedition.lcdui.Toolkit.disposeObject(Toolkit.java:313)
    	at javax.microedition.lcdui.ToolkitInvoker.toolkitDisposeObject(ToolkitInvoker.java:91)
    	at com.nokia.mid.ui.impl.DeviceControlImpl.registeredFinalize(DeviceControlImpl.java:106)
    	at com.nokia.mid.ui.impl.DeviceControlImpl$1.finalize(DeviceControlImpl.java:72)
    The code runs in emulator. S60 5th Edition SDK v0.9

    Is there a workaround? Will it work on real device?

    Thank you!!!
    Michael

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Exception on vibration and backlight

    You should test it on a real phone... emulators are often poor representations of the device.

    Older Series 60 devices have poor or missing support for vibrate, so I wouldn't be entirely surprised if it causes a problem still.

    Why can you not access the lcdui.Display?

  3. #3
    Registered User
    Join Date
    Dec 2008
    Posts
    2

    Re: Exception on vibration and backlight

    Quote Originally Posted by grahamhughes View Post
    Why can you not access the lcdui.Display?
    It throws an exception saying you can't do that. It's documented in Nokia's docs.

Similar Threads

  1. Backlight and vibration on N70 / S60
    By klemensz in forum Mobile Java Games
    Replies: 2
    Last Post: 2006-07-30, 18:18
  2. Why no vibration on nokia6600?
    By jgjbgjb in forum Mobile Java Games
    Replies: 11
    Last Post: 2006-06-05, 08:53
  3. Vibration implementation on NOKIA 3650
    By s01200994 in forum Mobile Java General
    Replies: 5
    Last Post: 2004-06-13, 20:35
  4. backlight on the 7650
    By shmoove in forum Mobile Java General
    Replies: 16
    Last Post: 2004-04-03, 00:12
  5. 3650 Vibration
    By sketcher in forum Mobile Java General
    Replies: 2
    Last Post: 2003-06-23, 17:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •