Namespaces
Variants
Actions
Revision as of 08:34, 27 October 2011 by hamishwillee (Talk | contribs)

How to send MIDlet to background

Jump to: navigation, search
Article Metadata

Article
Created: Aleksi (03 Apr 2007)
Last edited: hamishwillee (27 Oct 2011)
{{{width}}}
21 Sep
2009

This articles shows how to use setCurrent(null) to send a foreground application to the background.

The setCurrent(null doesn't set the displayable to null but is used in Java ME implementations that support concurrent applications like S60 to send the foreground application to background (on Series 40 phones this approach does not work). The application that is shown is the last application that was shown before the MIDlet got activated. For example, if user launched the MIDlet from application shell just before then application shell is shown.

Following code can be used to send MIDlet to background:

Display display = Display.getDisplay(myMIDletClass);
display.setCurrent(null);
209 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved