You Are Here:

Community: Developer Discussion Boards

#1 Old pauseApp() ever called on emulator? - 1970-01-01, 02:00

Join Date: Mar 2003
Posts: 10
Moruk79
Offline
Registered User
Hello I had a problem and just wondered, if
pauseApp() is ever called from the emulator?
Reply With Quote

#2 Old RE: pauseApp() ever called on emulator? - 1970-01-01, 02:00

Join Date: Mar 2003
Posts: 419
Location: Irving, Texas, USA
pbergius
Offline
Regular Contributor
Hello,

If I remember correctly, pauseApp() method of MIDlet is not called in the phone, which might be emulated in the emulator.

Regards,

Petteri / Forum Nokia
Reply With Quote

#3 Old RE: pauseApp() ever called on emulator? - 1970-01-01, 02:00

Join Date: Mar 2003
Posts: 10
Moruk79
Offline
Registered User
f*** double posted
Reply With Quote

#4 Old RE: pauseApp() ever called on emulator? - 1970-01-01, 02:00

Join Date: Mar 2003
Posts: 10
Moruk79
Offline
Registered User
Thanks,
it seems like the emulator also does not call pauseApp().

Is it recommended, that I overwrite hideNotify() method of class Canvas to pause my Application?

If my MIDlet looses Focus, I wanna leave the Canvas and set the current Display to the MainMenu.
But the emulator hangs, if I invoke display.setCurrent(menu) in the overwritten hideNotify method, as soon as the MIDlet looses focus (i.e pressing "END" key).

Will this work on real device? If not, what is the recommended way to "manually pause" my aplication at loss of focus?
Reply With Quote

#5 Old RE: pauseApp() ever called on emulator? - 1970-01-01, 02:00

Join Date: Mar 2003
Posts: 419
Location: Irving, Texas, USA
pbergius
Offline
Regular Contributor
Hello,

Again, as far as I know, Nokia Java implementations don't call the hideNotify(), not at least when the system screen (e.g. incoming call) hides the midlet. Especially in Series 60 MIDlet runs happily in background as Symbian is a multitasking OS.

Regards,

Petteri / Forum Nokia
Reply With Quote

#6 Old RE: pauseApp() ever called on emulator? - 1970-01-01, 02:00

Join Date: Mar 2003
Posts: 10
Moruk79
Offline
Registered User
OK thx again,

but I wonder how can I pause my Animations then?


Imagine, I am playing my Game and there is an incoming call.
If I can not "pause" the MIDlet I would "die" in the Game before the call is over.


What is the recommended way to do that (on series 60 phones)?.
Reply With Quote

#7 Old RE: pauseApp() ever called on emulator? - 1970-01-01, 02:00

Join Date: Mar 2003
Posts: 419
Location: Irving, Texas, USA
pbergius
Offline
Regular Contributor
Well, you can't.

What you can do is to try to guess in the program that the user is not in interactive mode. Each time user presses a key a time variable is reset to the value of current time. A thread (Timer) checks this value. Let's say that the user hasn't pressed any key in few seconds. Then the game can go into a hibernation mode (with a suitable message shown to the user). User looses maybe few points or a life, but at least the whole game might not be lost.

Regards,

Petteri / Forum Nokia
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia