• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Midlet running background

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had think that a Midlet is paused when it's brought background. And it's not running anymore there.
Today, I read the javadoc of Display and it's seems my option was wrong. Can somebody give me some hints about:
1) When will a Midlet get background?
2) When will a Midlet get foreground?
3) When a Midlet get background, will it's pauseApp get called?
4) When a Midlet's pauseApp get called?
5) When a Midlet's startApp get called?
 
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My opinion is that even though the MIDlet is in background, it is could be either running, paused or the JVM itself could be preempted (the application would be suspended). All this is upto the device implementation.

From the MIDP 2.0 Spec,
An application is said to be in the foreground if its current Displayable is actually visible on the display device and if user input device events will be delivered to it. If the application is not in the foreground, it lacks access to both the display and input devices, and it is said to be in the background.

Since the spec doesnt mention anything about what happens to the state of the midlet when this switching happens, it is upto the device implementation to take care of it.

Found this thread interesting, while searching for more info on this.

State of Midlet on incoming call

[ June 13, 2006: Message edited by: Reghu Ram T ]
[ June 13, 2006: Message edited by: Reghu Ram T ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic