12-17-2009 07:04 AM
Is there a way to programatically keep the backlight always on?
I've tried this:
Backlight.enable(true, 86400); // a whole day
but didn't work. I've tried to set first autodim off in the options and then run the app, but still it does not work.
A thread checking light and flashing periodically is not an acceptable solution for me.
I am testing on simulator (JDE 4.2.1) and real device (8310).
Solved! Go to Solution.
12-18-2009 03:55 PM
How To - Enable the backlight and prevent the screen from turning off
Article Number: DB-00426
12-21-2009 04:01 AM - edited 12-21-2009 05:56 AM
Thanks for the link, Mark. I didn't know about the limitation of 255 seconds, I think it doesn't appear in the API reference.
But as I said, threads (or timers) are not a solution for my application. At least now I know there's no way of setting the backlight on with a single instruction.
EDIT: For those who may try the Timer approach (workaround?), note that the value "Backlight timeout" in the options menu has preference over your coded value in ms (at least this is what happens on simulators). The max timeout is 2 minutes (120 ms), so although the long param in Backlight.enable(boolean, long) can be as big as 255000, your timer must be called each 120000 ms or less.