File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java Micro Edition and the fly likes Possibility to run a midlet in back ground Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Possibility to run a midlet in back ground" Watch "Possibility to run a midlet in back ground" New topic
Author

Possibility to run a midlet in back ground

RadhaRavi Kiran
Greenhorn

Joined: Nov 18, 2007
Posts: 4
Hi all,

Is there any possibility for running a midlet in the background.
if so, how can i start that app while phone is turned on.
again how to get the control back to my app.

thanks in advance


-Thanks & Regards <br /> Ravi Kiran.
Syam Sathyan George
Ranch Hand

Joined: Apr 26, 2006
Posts: 64
I believe the features you are talking is not yet available on MIDP2.
But they are going to be available as part of MIDP3.

Sure there are tricks to make a Midlet run in the background.

1,I remember a trick in SE phones, display.setCurrent(null);
This might throw a NullPointerExp in many, but in those older versions, midlet vanishes from display and will continue to run in the background.
Two ways to get control in such a case(if the above works).

a,The hideNotify() will be invoked by the App manager, you can do scheduling or some low prioritized things in the background.
b,showNotify() will be invoked by AM if by chance the user or OS puts the midlet to the front, you can call repaint and set threads back to priority.


Syam.Sathyan.George
(My boss is a Jewish carpenter)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Possibility to run a midlet in back ground