×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Registered User
    Join Date
    Sep 2007
    Location
    Mumbai, India
    Posts
    54

    S60 3rd Edition MIDP 2.0 BackLight

    Hi,
    I need to control the backlight of a S60 3rd edition MIDP 2.0 device. However, if I try using the Nokia UI, the application does not build since Nokia UI was discontinued after MIDP1.0. The result is not satisfactory on using the standard Java function flashBackLight() of the Display class. The device behaves in a very unpredictable manner. It behaves as expected in certain cases, but the screen turns dark in some cases, if there is a key pressed event and the back light turns off for the rest of the application flow. Is there any other device specific way to control the backlight of Nokia devices?
    Awaiting a reply.

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: S60 3rd Edition MIDP 2.0 BackLight

    The Nokia UI is still in the devices although it is deprecated. So there is likely some issue with your build environment.
    But event with the Nokia UI API the control of the backlight is not working on all S60 devices. see also this KI
    http://wiki.forum.nokia.com/index.ph...on_S60_devices

    Hartti

  3. #3
    Registered User
    Join Date
    Sep 2007
    Location
    Mumbai, India
    Posts
    54

    Re: S60 3rd Edition MIDP 2.0 BackLight

    Hi Harti,
    Thanks a lot for your interest. I was indeed using the wrong build environment. After using the Nokia SDK with NetBeans, the build issue is resolved, however the DeviceControl.flashBacklight() still works in an unpredictable manner in the S60 devices.
    As for the DeviceControl.setLight(), does this function override the phone. I have a display timeout on the phone of 15 seconds. The setLight() is getting called every 25 seconds. Still the back light is on for the whole duration of the application flow.
    Thanks in advance.

  4. #4
    Regular Contributor
    Join Date
    May 2004
    Posts
    147

    Re: S60 3rd Edition MIDP 2.0 BackLight

    I think setting setLights() every n seconds is needed only for *some* phones. And maybe these phones are the exception rather than the norm. Calling it once was enough, in my testing, for N95, 6230 and some emulators.

  5. #5
    Registered User
    Join Date
    Sep 2007
    Location
    Mumbai, India
    Posts
    54

    Re: S60 3rd Edition MIDP 2.0 BackLight

    Hi,
    Well in my case, I want the light to go off after the timeout and light up again once the condition is met, to acquire the user's attention. However, after setting the back light through DeviceControl.setlight() the back light is not turned off even after the phone's display timeout. So, does the setLight() function override the phone ?
    Thanks

  6. #6
    Regular Contributor
    Join Date
    May 2004
    Posts
    147

    Re: S60 3rd Edition MIDP 2.0 BackLight

    So you want the normal light timeout to stay in effect?

    flashBackLight() seems like the main function for alerting the user without disrupting the normal light timeout, but you say it doesn't work right. Besides turning the light off yourself, I don't know how, if at all, you can restore the phone's own light control.

  7. #7
    Registered User
    Join Date
    Sep 2007
    Posts
    20

    Re: S60 3rd Edition MIDP 2.0 BackLight

    How would you turn the light off yourself? What function would be used to do that?

    thanks.

  8. #8
    Registered User
    Join Date
    Sep 2007
    Location
    Mumbai, India
    Posts
    54

    Re: S60 3rd Edition MIDP 2.0 BackLight

    Hi,
    There isnt any function as such for switching off the backlight.
    But the setLight(a,b) takes in two parameters, a- (which light?)....currently 0 for backlight and b-brightness - range 0 to 100. So, setLight(0,0) should ideally turn off the light.

  9. #9
    Regular Contributor
    Join Date
    May 2004
    Posts
    147

    Re: S60 3rd Edition MIDP 2.0 BackLight

    0 turns off light, at least on the phones I tried.

  10. #10
    Registered User
    Join Date
    Nov 2007
    Posts
    5

    Question Re: S60 3rd Edition MIDP 2.0 BackLight

    Hi all,

    I have a similar problem here with S40/S60 platforms. Once I discovered that flashBacklight() method in a TimerTask() was not working as it was supposed to on these platforms (flickering and dimming problems), I tried the DeviceControl.setLight(0, 100). Well, I can build the jar with no problems, but when running it on a S40/S60 emulator (or device, N95 for example), I get this exception:

    java.lang.NoClassDefFoundError: com.nokia.mid.impl.isa.ui.DeviceControl

    I'm importing com.nokia.mid.ui.DeviceControl, not com.nokia.mid.impl.isa.ui.DeviceControl. Does anybody have any clue about what I'm doing wrong?

    Thanks in advance.

  11. #11
    Registered User
    Join Date
    Jul 2007
    Location
    Germany
    Posts
    48

    Re: S60 3rd Edition MIDP 2.0 BackLight

    Hi All,

    I need to disable the screen saver, and as far as I find out until now in Wiki and here, I should use Nokia's API setLights().

    I have a "collateral" problem: could anyone please tell me how to import the DeviceControl?

    more exactly where shoul I put this line, and what else do I need?:

    Code:
    import com.nokia.mid.ui.DeviceControl;

    The sample code that I find and I need to use looks like:

    Code:
     
    while( true )
    {
        DeviceControl.setLights( 0, 100 );
        Thread.sleep( 2000 );  // 2 seconds
    }

    Note: I am using C++.

    Many thanks,
    Adriana.
    Last edited by Adriana_P; 2008-11-11 at 10:18.

  12. #12
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: S60 3rd Edition MIDP 2.0 BackLight

    Quote Originally Posted by Adriana_P View Post
    more exactly where shoul I put this line, and what else do I need?:

    Code:
    import com.nokia.mid.ui.DeviceControl;
    You put the import statement at the beginning of the midlet. Right at the top of the code.

    Quote Originally Posted by Adriana_P View Post
    Note: I am using C++.
    What do you mean?

  13. #13
    Registered User
    Join Date
    Jul 2007
    Location
    Germany
    Posts
    48

    Re: S60 3rd Edition MIDP 2.0 BackLight

    Please forget my question about where to put that statement.

    My application in written in Symbian C++.

    The code above is in Java, and I need to find something similar in C++, so a way to disable the screen saver (or reset the timer, because as far as find out lately, disabling it is not possible.

    Adriana.

  14. #14
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: S60 3rd Edition MIDP 2.0 BackLight

    I'm not sure I understand your exact requirement, but would this help?
    http://wiki.forum.nokia.com/index.ph...e_Backlight_on

  15. #15
    Registered User
    Join Date
    Jul 2007
    Location
    Germany
    Posts
    48

    Re: S60 3rd Edition MIDP 2.0 BackLight

    Yes, thank you.

    This is a way to avoid the screen saver. The problem is that the BackLight stays ON, so batery goes low quick, so I have another problem: how to turn off the back light And this seems to not be so easy.

Similar Threads

  1. Doubts - S60 3rd Edition versus S60 3rd Edition FP1
    By juarezjunior in forum Symbian
    Replies: 4
    Last Post: 2009-04-27, 11:29
  2. speech recognition in s60 3rd edition
    By fatema27 in forum Symbian
    Replies: 10
    Last Post: 2008-08-14, 06:06
  3. CodeWarrior 3.1.1 does not create SIS-file for S60 3rd edition SDK
    By petpieta in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2007-09-11, 09:42
  4. RTP support on MIDP S60 3rd edition
    By raju_ajmera in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2006-05-19, 08:59

Posting Permissions

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