Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
JDE 4.0.0
Constructor Summary
Backlight() Deprecated.All members of Backlight are static.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Method Detail
enable
public static void enable(boolean on)
Turns the backlight on or off.
Parameters:
on - If true, turn the backlight on. The backlight remains on
for the duration specified by setTimeout(int). User activity
while the backlight is on causes the timer to reset.
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
enable
public static void enable(boolean on,
int seconds)
Turns the backlight on or off.
This function is asynchronous. Wait a short period (such as 100 ms)
after invoking enable() before checking if the backlight is on by invoking
isEnabled().
Parameters:
on - If true, turn the backlight on. The backlight remains
on for the duration specified. User activity while the backlight is on
causes the timer to reset to the value specified in
setTimeout(int).
seconds - Number of seconds to leave the backlight on for
Values larger than 255 seconds are reduced to 255 seconds.
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getBrightness
public static int getBrightness()
Gets the brightness of the backlight.
Returns:
Percentage of maximum capable brightness (i.e. a number between
1 and 100).
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getBrightnessDefault
public static int getBrightnessDefault()
Gets the default brightness of the backlight.
Returns:
Percentage of default brightness (i.e. a number between
1 and 100).
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getBrightnessIncrement
public static int getBrightnessIncrement()
Retrieves the recommended percentage increment for backlight brightness.
Note: While the the backlight's brightness is a percentage,
the range varies between device types. The increment is
rounded down to the nearest integer. For example, if the device range is
7, the increment would be 14
Returns:
An increment between 1 and 100. Returns 0 to indicate the
platform does not support this method.
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
getTimeoutDefault
public static int getTimeoutDefault()
Gets the backlight default timeout.
Parameters:
seconds - Default timeout value (255 seconds is the maximum allowed value).
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
isBrightnessConfigurable
public static boolean isBrightnessConfigurable()
Determines if the brightness of the backlight is configurable.
Returns:
True if the brightness of the backlight is configurable;
otherwise, false.
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
isEnabled
public static boolean isEnabled()
Determines if the backlight is currently on.
Returns:
True if the backlight is currently on; otherwise, false.
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
setBrightness
public static void setBrightness(int brightness)
Sets the brightness of the backlight.
Parameters:
brightness - Percentage of maximum capable brightness (i.e. a
number between 0 and 100).
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
setTimeout
public static void setTimeout(int seconds)
Sets the backlight timeout.
Parameters:
seconds - Timeout value (255 seconds is the maximum allowed value).
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved. Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. Copyright 2002-2003 Nokia Corporation All Rights Reserved. Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.