Discussion Board

Results 1 to 7 of 7

Hybrid View

  1. #1
    Registered User Moruk79's Avatar
    Join Date
    Mar 2003
    Posts
    10
    Hello I had a problem and just wondered, if
    pauseApp() is ever called from the emulator?

  2. #2
    Regular Contributor pbergius's Avatar
    Join Date
    Mar 2003
    Location
    Irving, Texas, USA
    Posts
    419
    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

  3. #3
    Registered User Moruk79's Avatar
    Join Date
    Mar 2003
    Posts
    10
    f*** double posted

  4. #4
    Registered User Moruk79's Avatar
    Join Date
    Mar 2003
    Posts
    10
    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?

  5. #5
    Regular Contributor pbergius's Avatar
    Join Date
    Mar 2003
    Location
    Irving, Texas, USA
    Posts
    419
    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

  6. #6
    Registered User Moruk79's Avatar
    Join Date
    Mar 2003
    Posts
    10
    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)?.

  7. #7
    Regular Contributor pbergius's Avatar
    Join Date
    Mar 2003
    Location
    Irving, Texas, USA
    Posts
    419
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved