Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
New Developer
AtariPete
Posts: 8
Registered: ‎08-21-2008

setDisplay(null) to get midlet to run in background, why?

[ Edited ]

Overview

To properly run my midlet in the background on pausApp, I need always setDisplay to null. The code looks like this:

 

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

 

If i do not set display to null, then the background thread of my application doesn't seem to run (the application really does pause).

 

Question

So this solution works great, but I'm curious to know why it works? Why must I set display to null for the application's background thread to run on pauseApp?

Message Edited by AtariPete on 09-24-2008 01:23 AM
Please use plain text.
Administrator
MSohm
Posts: 13,073
Registered: ‎07-09-2008
My Carrier: Bell

Re: setDisplay(null) to get midlet to run in background, why?

MIDlets do not support background processing.  So it should be expected that a MIDlet is paused when it is not in the foreground.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.