Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2007

    pushing an application to the foreground

    hi, i have written an application which when it detects certain situation it presents it to the user.
    the intention is to run this application in the background all the time.
    the problem is that when the situation is detected and the appl is in the background it can do, to draw
    the user attention to it, is to vibrate and play sounds. but the user would not know which application it is.
    is there a way in java to make the application jump to the foreground? so that flashing the back light is possible...

    same problem occurs when the application is in the foreground but the display dims after having not used it for a couple of minutes
    and another situation is when a screen saver activates...
    i need a solution for all 3 situations, but any would help.
    is there anything that can be done?

  2. #2
    Registered User
    Join Date
    Dec 2009

    Re: pushing an application to the foreground

    to set a j2me app to the background use the following in your midlet class:

    Display.getDisplay (this).setCurrent (null);

    to get the screen back use the following:

    Display.getDisplay (this).setCurrent (myCanvas);

    Where myCanvas is your canvas instantiation

    p.s. You can still use a thread or timer to do things in the background while your midlet is hidden.

    p.s.2: this does not work on all models. (Works on Nokia s60)

Similar Threads

  1. About bring the application to foreground
    By charles_happysunny in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-10-01, 12:09
  2. Bring the application to the foreground with a key pressed!
    By amerzannouneh in forum Symbian User Interface
    Replies: 14
    Last Post: 2008-07-17, 13:45
  3. Replies: 0
    Last Post: 2008-04-24, 12:33
  4. Replies: 7
    Last Post: 2005-09-05, 14:36
  5. Replies: 1
    Last Post: 2005-01-21, 08:04

Posting Permissions

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