Skip to main content

Backlight control?

3 replies [Last post]
kawaiimomo
Offline
Joined: 2008-07-10

Hello,

I was guessing if there's some implementation on LWUIT to control backlight but I haven't found anything (besides proprietary APIs).

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Shai Almog

Hi,
LWUIT isn't offering this but we might offer something in a future
revision.

Try:
javax.microedition.lcdui.Display.getDisplay(midlet).flashBacklight
(duration);

> Hello,
>
> I was guessing if there's some implementation on LWUIT to control
> backlight but I haven't found anything (besides proprietary APIs).
> [Message sent by forum member 'kawaiimomo' (kawaiimomo)]
>
> http://forums.java.net/jive/thread.jspa?messageID=290619
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

Shai Almog
http://lwuit.blogspot.com/

[att1.html]

kawaiimomo
Offline
Joined: 2008-07-10

Hi Shai,

it would be really nice for LWUIT to support this :-)

BTW, I'm working mostly for nokia phones and the flashBacklight() method doesn't work, so I'm going with classic solution:

try {
//Enable backlight for nokias
Class.forName("com.nokia.mid.ui.DeviceControl");
com.nokia.mid.ui.DeviceControl.setLights(0, 100);
} catch (ClassNotFoundException e) {}

Thanks.

Shai Almog

Hi,
LWUIT probably won't support a Nokia specific class anyway... This
would make the need of supporting some broken platforms (e.g.
Blackberry) even harder.

Thanks.

> Hi Shai,
>
> it would be really nice for LWUIT to support this :-)
>
> BTW, I'm working mostly for nokia phones and the flashBacklight()
> method doesn't work, so I'm going with classic solution:
>
> try {
> //Enable backlight for nokias
> Class.forName("com.nokia.mid.ui.DeviceControl");
> com.nokia.mid.ui.DeviceControl.setLights(0, 100);
> } catch (ClassNotFoundException e) {}
>
> Thanks.
> [Message sent by forum member 'kawaiimomo' (kawaiimomo)]
>
> http://forums.java.net/jive/thread.jspa?messageID=290627
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

Shai Almog
http://lwuit.blogspot.com/

[att1.html]