×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    7

    Question N95 Keeping the Screen Saver from taking control

    Hi,

    On N95, I am trying to keep the Screen Saver from taking control bye performing the following command in a thread.
    But no success, any Idea?

    Thanks

    Tzahi Witman

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

  2. #2
    Registered User
    Join Date
    Jul 2005
    Posts
    48

    Re: N95 Keeping the Screen Saver from taking control

    A bump on this thread.

    I too am trying to do something to stop the screen saver from coming on while video is playing in my J2ME app.

    Is there a way to do this? Or should I just be letting the user know they need to press a key every once in a while.

    It doesn't happen when played through RealPlayer so there must be a Symbian way of doing it.

  3. #3
    Registered User
    Join Date
    Jul 2005
    Posts
    48

    Re: N95 Keeping the Screen Saver from taking control

    Does anyone know which E3 FP1 Devices this doesn't work on? I am testing on a N95-3 (850MHz version with V10.2.006 firmware) and it doesn't seem to be working.

    Notes from latest Nokia-UI docs below.

    This function may also be used to prevent screen saver appearance (supported in S60 devices starting from S60 3rd Ed FP1, except for some early FP1 devices). Calling this function once will delay the screen saver appearance but does not disable it permanently. Thus, if the screen saver should be wholly disabled, it is needed to call the function repeatedly for example in a separate thread. The delay between two calls should be smaller than the time-out of the screensaver (the time-out may be for example 15 seconds or more depending on the used device).

  4. #4
    Registered User
    Join Date
    Jul 2005
    Posts
    48

    Re: N95 Keeping the Screen Saver from taking control

    And I have the same issue where the screen saver still comes on for the 6120 Classic firmware V03.70.

    Code I am using is as follows:

    Code:
    private class KeepLightsOn extends Thread {
    		
    		private boolean lightsOn;
    		private int LIGHTS_SLEEP_TIME = 10000;
    		/**
    		 * Constructor
    		 *
    		 */
    		KeepLightsOn() {
    			
    		}
    		
    		public void run() {
    			//myMidlet.addErrorLog("Lights on started");
    			while(lightsOn) {
    				//#ifdef polish.api.nokia-ui
    					//# //DeviceControl.setLights(0, 0);
    					//# DeviceControl.setLights(0, 100);
    				//#endif
    	    		try {
    		    		sleep(LIGHTS_SLEEP_TIME);
    		    	}
    		    	catch (InterruptedException ie) {
    		    		myMidlet.addErrorLog("MP: Lights on interrupted: " + ie.toString());
    		    	}
    		    	catch (Exception e) {
    		    		
    		    	}
    			}
        		
    		}
    		public void startLights() {
    			lightsOn = true;
    			start();
    		}
    		public void stopLights() {
    			//myMidlet.addErrorLog("Lights on stopped");
    			lightsOn = false;
    			//TODO fix this setting of the lights manually
    			//#ifdef polish.api.nokia-ui
    				//# DeviceControl.setLights(0, 50);
    			//#endif
    		}
    		
    	} // End KeepLightsOn

Similar Threads

  1. N95 Screen Server
    By witmant in forum Mobile Java General
    Replies: 3
    Last Post: 2008-09-27, 10:09
  2. Screen type of N95 8GB
    By MatthiasStevens in forum Mobile Java General
    Replies: 1
    Last Post: 2008-08-18, 17:37
  3. Screen Saver using J2ME
    By comando_c in forum Mobile Java General
    Replies: 3
    Last Post: 2007-09-03, 19:14
  4. .GIF to Screen Saver (6681)
    By greatarsenic in forum General Development Questions
    Replies: 4
    Last Post: 2005-11-20, 03:27
  5. Replies: 0
    Last Post: 2003-10-06, 15:51

Posting Permissions

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