×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    14

    Cool Disable Hang Up key.

    Hi all

    I need to disable hang up(red key) key in my application to avaoid unusual destroy of apps.instead am providing seperate exit key in my apps itself.

    As for as the nokia device is concerned we can disable hang up through jad setting.i come to know this through google search.but i dont know how to do it.

    if any body knows please help me on this.

    also if there is any other method to disable the key , please let me know?

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

    Re: Disable Hang Up key.

    Nokia-MIDlet-No-Exit
    This is supported since S60 3rd Edition FP 2

    This Prevents the MIDlet from closing via pressing the End key. Instead of closing the MIDlet it is put to the background. The MIDlet can be still closed from the list of open applications.
    true or false
    Example:
    Nokia-MIDlet-No-Exit: true
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    14

    Cool Re: Disable Hang Up key.

    Thanks Raj

    I have tried what u have suggested ..
    it was working fine. But the think is if I press the hang up twice or more then the apps get exited.
    only for once its being disabled.

    To disable through out the application what can i do?

    And one more thing, how can i come to know that Hang up key is pressed?

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

    Re: Disable Hang Up key.

    Quote Originally Posted by sivaji_boss View Post
    Thanks Raj

    1.I have tried what u have suggested ..
    2. And one more thing, how can i come to know that Hang up key is pressed?
    1. What is actually happening?
    Whether the application went in the background or what?

    2. You can get that keycode in the keypressed().
    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
    May 2010
    Posts
    14

    Cool Re: Disable Hang Up key.

    Quote Originally Posted by raj_J2ME View Post
    1. What is actually happening?
    Whether the application went in the background or what?

    2. You can get that keycode in the keypressed().
    Application is getting exited if we press twice.
    its not going background.
    ya i am able to get all keys other than this hang up key

  6. #6
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Disable Hang Up key.

    but what happens if you press it only once ?
    on what device are you testing ?

  7. #7
    Registered User
    Join Date
    May 2010
    Posts
    14

    Re: Disable Hang Up key.

    nothing happens if i press once. application is ideal and thats what i want.

    am testing on nokia supernova and 3110

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

    Re: Disable Hang Up key.

    Quote Originally Posted by sivaji_boss View Post
    nothing happens if i press once. application is ideal and thats what i want.

    am testing on nokia supernova and 3110
    Hey did you test the same on any of the S60 device?

    I guess both the devices are the S40.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  9. #9
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Disable Hang Up key.

    check the devices here :
    http://www.forum.nokia.com/devices/matrix_all_1.html

    and compare that to what raj_j2me said :
    "This is supported since S60 3rd Edition FP 2"
    in his first post...

    It's always a good idea to know exactly what your target devices are, what your testing devices and platforms are and obviously read the answers you are getting very very carefully...

  10. #10
    Registered User
    Join Date
    May 2010
    Posts
    14

    Re: Disable Hang Up key.

    No raj. But this apps should work in all device.
    Thats y am checking its in low end device first

  11. #11
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Disable Hang Up key.

    well that specific JAD-attribute won't work on all devices...
    which brings us back to your original question ?
    Is there a way to disable the Hang Up Key on all devices ?
    Well I'm afraid that the answer is no...
    Don't forget that a user has to have the final word and thus the control on the device not an application...
    So if a user wants to close the app by pressing the red key the app should do so, otherwise you could as well write a non-closable virus... Or something that disbales the green keym thus making it impossible for an user to answer a phone call if your application is running and actually blocking the user from an action he wants to do...

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

    Re: Disable Hang Up key.

    Quote Originally Posted by sivaji_boss View Post
    No raj. But this apps should work in all device.
    Thats y am checking its in low end device first
    Tiger speaks all about your need, all what you must go with all considerations....Read his post carefully.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

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

    Re: Disable Hang Up key.

    Quote Originally Posted by sivaji_boss View Post
    I have tried what u have suggested ..
    As Tiger69 and Raj have indicated, this works only on Series 60 devices - it will have no effect on your Series 40s.

    Quote Originally Posted by sivaji_boss View Post
    But the think is if I press the hang up twice or more then the apps get exited.
    What you are seeing is the normal behaviour for Series 40 devices. I'm guessing you have an open GPRS connection ("G" (or "E", or "3G" or world) symbol shows in the status area at the top of the screen), in which case the first press of the END key (red key) terminates the connection, but not the app. Pressing the END key when there is no open GPRS connection will always terminate the application.

    Graham.

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

    Re: Disable Hang Up key.

    Hey Graham,
    This quoted text seems surprising to me,
    I'm guessing you have an open GPRS connection ("G" (or "E", or "3G" or world) symbol shows in the status area at the top of the screen), in which case the first press of the END key (red key) terminates the connection, but not the app. Pressing the END key when there is no open GPRS connection will always terminate the application.
    AS far as I had worked on the apps which mostly uses the GPRS connection, and as soon as I pressed the red key application gets exited.Even though the connection was i used.

    Please share your point of view.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

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

    Re: Disable Hang Up key.

    Depends on the device, but this is usual on a lot of Series 40 devices. It might only apply when a high-level Connection object (like an HttpConnection) is actually using the network. Older Series 40's always drop the GPRS connection when they're finished with it, but newer ones seem to hang on until the application closes. That might change the red-key behaviour. Try pressing the red-key during a call to (say) HttpConnection.getResponseCode()... on a Series 40 (at least, the ones I tried on) you should find that the call throws an IOException. If you have newer devices to me, you might get different results.

    Graham.

Similar Threads

  1. Replies: 6
    Last Post: 2009-07-22, 09:44
  2. Replies: 27
    Last Post: 2008-09-11, 12:40
  3. not getting send (call or green) key event
    By vasant21 in forum Symbian
    Replies: 2
    Last Post: 2007-01-09, 17:31
  4. GameCanvas Middle Soft Key Problem
    By nnigel in forum Mobile Java General
    Replies: 5
    Last Post: 2006-06-27, 11:14
  5. keybindings nokia7650 and nokia6310i
    By topisystems in forum Mobile Java General
    Replies: 1
    Last Post: 2002-06-05, 14:25

Posting Permissions

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