04-29-2010 11:53 PM
I searched for "background MIDlet" on blackberry.com and found statements
"MIDlets do not support background processing. So it should be expected
that a MIDlet is paused when it is not in the foreground."
"Note that if you were to change the application from a MIDlet to a
BlackBerry CLDC application you would have the ability to run the
application in the background and keep it running indefinitely."
But other people suggest that call to notifyPaused or
display.setCurrent(null) does bring the MIDlet to a background or paused
state. So, I tried both ways on my 8330m and now I see that my MIDlets do, indeed, work
on the background, they are shown in the "Switch Application" window, their
threads are working, connections arriving, etc. So, they appear to behave
exactly like CLDC app running on the background.
But then what do these statements quoted above mean? What is the difference
between a paused MIDlet and a background CLDC app?
In particular, what this statement "CLDC ... have the ability to run the
application in the background and keep it running indefinitely" mean? Does
it suggest that a MIDlet would not stay in paused state indefinitely? Would
it be destroyed at some point?
Could someone clarify?