×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    17

    Question How to prevent Midlet closing with Hang up button

    Hi again,
    my app needs to stay open for a while (Normal usage would need it to stay active until user decides to finish) but closes whenever the Hang-up button is pressed. Is there a way to prevent this and put it in a paused state instead?
    Thanks
    David

  2. #2
    Registered User
    Join Date
    Feb 2008
    Posts
    8

    Re: How to prevent Midlet closing with Hang up button

    You have to call confirmation dialog somewhere in quitApp() method of your Midlet and if answer is positive call destroyApp()

  3. #3
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: How to prevent Midlet closing with Hang up button

    Quote Originally Posted by dschmider View Post
    Hi again,
    my app needs to stay open for a while (Normal usage would need it to stay active until user decides to finish) but closes whenever the Hang-up button is pressed. Is there a way to prevent this and put it in a paused state instead?
    Thanks
    David
    Hi dschmider,
    Welcome here on the Forum Nokia DiBo,
    By hangup key do you mean the red key?
    On which device you are trying to implement this?

    Prior to 3rd Edition FP2, all Series 60s push Java apps to the background on red-key. From 3FP2 and onwards, they kill the application, until and unless you add:
    Nokia-MIDlet-No-Exit: true
    to the JAD or Manifest.

    Please check if this helps you,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  4. #4
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: How to prevent Midlet closing with Hang up button

    And for
    Is there a way to prevent this and put it in a paused state instead?
    add to the JAD or Manifest file:
    Nokia-MIDlet-Background-Event: pause
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  5. #5
    Registered User
    Join Date
    Apr 2009
    Posts
    17

    Re: How to prevent Midlet closing with Hang up button

    "Nokia-MIDlet-No-Exit: true" & "Nokia-MIDlet-Background-Event: pause" in the JAD worked a treat for me. Thanks

    Will this work for other manufacturers, or is it purely as the description denotes?
    If not, is there a list of equivelents for other Manufactirers?
    Thanks again Raj for this, and to ivan for your suggestion.
    Kind Regards
    David

  6. #6
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How to prevent Midlet closing with Hang up button

    These will work on precisely the platforms Raj indicated, and not on anything else. They should work on Series 60 devices from other manufacturers, such as Sony Ericsson's Satio.

    The behaviour of pushing applications to the background on red-key is pretty much unique to old versions of Series 60. This was changed in later versions, so that they now terminate the application like other devices. The option Raj posted was added really for developers whose applications were broken by this change, so that they could force the S60 platform back to its pre-3rd Edition behaviour.

    I'm not aware of any equivalents for other platforms, though they might exist.

    Bear in mind that many devices (such as Series 40) are simply not capable of running applications in the background.

    Graham.

Similar Threads

  1. Replies: 3
    Last Post: 2009-09-17, 19:48
  2. Data caging: how does it prevent a native app in C++ access data written by a MIDlet?
    By mpeivrsn in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2009-03-23, 23:17
  3. image full screen
    By Morbidick in forum Mobile Java General
    Replies: 8
    Last Post: 2008-12-04, 04:16
  4. Minimizing and Maximizing a Midlet
    By lekkie in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2007-02-20, 08:15
  5. 技术文档:MIDP 2.0安全机制 与 MIDlet 数字签名
    By wotrust in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 0
    Last Post: 2006-12-30, 07:42

Posting Permissions

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