×

Discussion Board

Results 1 to 3 of 3

Thread: screen saver

  1. #1
    Registered User
    Join Date
    Feb 2007
    Posts
    25

    Exclamation screen saver

    Does anyone know of a routine that will stop the screen saver from coming on in a canvas. i know there is no possible command to turn it off i am just after something that will stop if from coming on. maybe using a timer or something any help would be great thanxx

  2. #2
    Super Contributor
    Join Date
    Feb 2006
    Posts
    689

    Re: screen saver

    Hi michaellhann89,
    Hope this will be useful for you

    import com.nokia.mid.ui.DeviceControl;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;

    public class BacklightWorkaround extends MIDlet {

    private SimpleCanvas canvas;

    /**
    * Keeps the backlight on by repeatedly setting
    */
    class LightThread extends Thread {
    public void run() {
    while(true){

    DeviceControl.setLights(0, 100);
    try {
    Thread.sleep(5000);
    } catch (InterruptedException ex) {
    ex.printStackTrace();
    }
    }
    }
    }

    private class SimpleCanvas extends Canvas implements CommandListener{
    private Command exitCmd;
    private MIDlet midlet;

    public SimpleCanvas(MIDlet midlet) {
    this.midlet = midlet;
    exitCmd = new Command("Exit",Command.EXIT, 1);
    addCommand(exitCmd);
    setCommandListener(this);
    }
    public void paint(Graphics g) {
    g.drawString("Let there be light.", 0, 0, Graphics.LEFT|Graphics.TOP);
    }

    public void commandAction(Command command, Displayable displayable) {
    if(command == exitCmd){
    midlet.notifyDestroyed();
    }
    }
    }

    public void startApp() {
    if(canvas == null){
    canvas = new SimpleCanvas(this);
    new LightThread().start();
    }

    Display.getDisplay(this).setCurrent(canvas);
    }

    public void pauseApp() { }

    public void destroyApp(boolean unconditional) { }
    }

    Thanks
    Soku

  3. #3
    Registered User
    Join Date
    Mar 2003
    Location
    Switzerland, lausanne
    Posts
    5

    Re: screen saver

    this trick doesn't work on series 60 3rd

Similar Threads

  1. change current screen saver
    By omaravet in forum Symbian
    Replies: 0
    Last Post: 2007-03-21, 21:52
  2. Screen Saver Event
    By Harald_Grossauer in forum Symbian
    Replies: 3
    Last Post: 2007-03-08, 09:07
  3. Screen saver notification
    By heuven in forum Symbian
    Replies: 1
    Last Post: 2006-12-29, 04:48
  4. How to remove the screen saver without turning the backlight on.
    By redzvika in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-07-06, 13:47
  5. Screen saver in Themes
    By ronny60299 in forum Symbian
    Replies: 3
    Last Post: 2005-04-14, 10:42

Posting Permissions

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