Killing the appliction


Last Updated:

  1. eyalm_nm

    eyalm_nm Member This Topic's Starter

    Joined:
    Feb 5, 2010
    Messages:
    11
    Likes Received:
    0
    I'd like to kill my app whenever the user use the Exit item in my app's menu.
    How it can be done?
    Currently, I'm using System.exit(0). But, the result of using it, is rerun the application.
    Thanks,
    Eyal.
     

    Advertisement
  2. KlaymenDK

    KlaymenDK Well-Known Member

    Joined:
    May 29, 2009
    Messages:
    1,217
    Likes Received:
    130
    Well, according to the Android application life cycle, onDestroy() is the last thing to be called before the app finally dies, and I read that it responds to, for instance, a call from YourActivity.finish().

    Hope that helps...
     
    eyalm_nm likes this.
  3. antipesto93

    antipesto93 Well-Known Member

    Joined:
    Feb 4, 2010
    Messages:
    480
    Likes Received:
    35
    Bump - the Chinese spam message above this is messing up the forum homepage...so i had to bump a thread to get rid of it :)
     
  4. KlaymenDK

    KlaymenDK Well-Known Member

    Joined:
    May 29, 2009
    Messages:
    1,217
    Likes Received:
    130
    That's not the way to solve things... :rolleyes: I hope you at least clicked "[​IMG]Report post"?
    I've now trashed 7 chinese spam posts. :mad:
     
  5. gorn

    gorn Well-Known Member

    Joined:
    Mar 22, 2010
    Messages:
    48
    Likes Received:
    11
    Code (Text):
    1. this.finish();
    might be what you are looking for
     

Share This Page

Loading...