×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    12

    Red face LCD swictches off

    When i run my midlet (game) and don't press any keys the LCD back light switches off. How do i prevent this from happening?

  2. #2
    Regular Contributor
    Join Date
    May 2007
    Location
    India
    Posts
    208

    Re: LCD swictches off

    Quote Originally Posted by yrdawson View Post
    When i run my midlet (game) and don't press any keys the LCD back light switches off. How do i prevent this from happening?
    setLights method of DeviceControl class may help you. Please go thorough the API docs for more details.
    Nokia UI API 1.1 Java Doc

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: LCD swictches off

    Use com.nokia.mid.ui.DeviceControl.setLight(0,100);


    setLights
    public static void setLights(int num,
    int level)Activates and deactivates the lights on the device. Parameter num indicates the number of the device light to control. Currently only one num parameter value is specified: num value 0 is used for controlling the screen backlight. Parameter level is a value between 0-100, which indicates the brightness of the light. In many implementations, there are only two levels: on or off. Value 0 indicates lights off for monochrome displays or the minimum brightness setting for color displays. All other level values (1-100) are used for turning the lights on, possibly with different brightness levels, depending on the value. A larger value always results in either the same brightness setting as a lower one, or a brighter setting. For many products, values 1-100 will just turn the lights on.
    Note: Since in some devices key presses may turn on some device lights, the light settings may be changed also by the system.


    Parameters:
    num - is the number or id for light, 0 is used for display backlight, other numbers are currently left unspecified.
    level - the lighting level 0-100. 0 means "off" or some other minimum lighting setting. For many devices, a value greater than 0 means "light on".
    Throws:
    java.lang.IllegalArgumentException - if light num is not supported or level is not between 0-100.
    Since:
    1.0

    thanks,
    ~Amitabh

  4. #4
    Super Contributor
    Join Date
    Sep 2008
    Location
    Noida, U.P.
    Posts
    1,330

    Re: LCD swictches off

    suggestion is already given by im2amit. can follow him..
    thanks,
    jitu_goldie..

    KEEP TRYING..

Posting Permissions

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