It's not a secret anymore!*
The moose likes Product and Other Certifications and the fly likes Midlet running background Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "Midlet running background" Watch "Midlet running background" New topic
Author

Midlet running background

Song Lixin
Greenhorn

Joined: Nov 11, 2003
Posts: 19
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?


SCJP1.2<br />SCJD<br />SCMAD
Reghu Ram Thanumalayan
Ranch Hand

Joined: Oct 21, 2003
Posts: 193
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 ]

Cheers,<br />Reghu Ram T<br /> <br />SCJP 1.4 - 98 %, SCBCD 1.3 - 94 %, SCMAD 1.0 - 92 %
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Midlet running background
 
Similar Threads
Stop audio record when another recording app opens
Regarding Background thread
A1000 in power save mode and background threads
how can i capture a call using a midlet ?
Mock Exam Batch 1!!