×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    37

    Abruptly closing application

    Hi,


    I am very new to mobile gaming.developing game for series 40.

    Need a idea that if user presses Red Button then application will close abruptly. Now when user restart it again it shoul show menu with "countinue" option Highlighted so he can start from where he left. My main class which extend FullCanvas implements Runnable Interface. How can i implement this into my 40 series programe

    Thanx.
    wating for reply

  2. #2
    Registered User
    Join Date
    Jul 2003
    Location
    Finland, Tampere
    Posts
    1,113
    vishwas_dot_h
    System first calls your destroyApp method first, where you will be able to save current state.

    protected abstract void destroyApp(boolean unconditional)
    throws MIDletStateChangeException

    Signals the MIDlet to terminate and enter the Destroyed state. In the destroyed state the MIDlet must release all resources and save any persistent state. This method may be called from the Paused or Active states.
    MIDlets should perform any operations required before being terminated, such as releasing resources or saving preferences or state.
    Try getting some tutorials. There are nice and not complex on Forum Nokia. Also have a look at Sun's resources.

  3. #3
    Registered User
    Join Date
    Sep 2003
    Posts
    37

    Hi Doctordwarf

    Hi,


    Agree to that...but how application will know that application was abruptly closed down when user restart it.

    option:

    1) On abruptly close should i save this into RMS that i is closing abruptly..and next time when user restart application will read and determine that it has to start normaly or Countinue from where he/she closed down the application.


    2) At restart if it was detected taht previous exit was accidentaly(Red Button) how will i resume a thread from that perticular point

  4. #4
    Registered User
    Join Date
    Jul 2003
    Location
    Finland, Tampere
    Posts
    1,113
    vishwas_dot_h
    Agree to that...but how application will know that application was abruptly closed down when user restart it

    Save information about it

    should i save this into RMS that i is closing abruptly..and next time when user restart application will read and determine that it has to start normaly or Countinue from where he/she closed down the application
    exactly

    At restart if it was detected taht previous exit was accidentaly(Red Button) how will i resume a thread from that perticular point
    This is absolutely up to your application logic how to restore its state. Save all the info you need for this purpose to RMS.

Posting Permissions

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