Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Possibility to run a midlet in back ground

 
RadhaRavi Kiran
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Syam Sathyan George
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic