Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Exit from application

Hi, Is there any way to force an exit from an application?

— asked March 30th 2010 by Fabian Brussa
  • exit
0 Comments

5 Answers

  • Hey Fabian,

    I've seen a few discussions about that and consensus seems to be that no there isn't, and if you were to find a way to do that Apple would most likely reject your app because according to Apple an app should not terminate itself.

    http://stackoverflow.com/questions/355168/proper-way-to-exit-iphone-application

    https://developer.appcelerator.com/question/3961/api-call-to-exit-application

    https://developer.appcelerator.com/question/8951/how-can-i-exit-an-iphone-app

    — answered March 30th 2010 by Dan Giulvezan
    permalink
    0 Comments
  • Do you have a reason to exit the app explicitly?

    Cause Apple only 1 single 3rd party app to run any point of time and also, like Dan mentioned, Apple policy for 3rd party app is that it shouldn't terminate itself.

    — answered March 31st 2010 by Peter Lum
    permalink
    0 Comments
  • Thanks for responding.

    I understand what they say and I agree.

    I'm finishing an application that simulates an SMS, so when you receive the SMS, the app need to close, but is not absolute necessity.

    — answered March 31st 2010 by Fabian Brussa
    permalink
    0 Comments
  • My application is closed and navigate to home screen using setting both [exitOnClose:true; OR Titanium.Android.currentActivity.finish();] but at settings->manage application->running it showing my application icon running list at back end so how to resolve this issue?I want when my application is gets closed at a time i want to stop back end running process also.please help me out.

    — answered November 19th 2011 by Fernan Delgado
    permalink
    1 Comment
    • Hi Fernan

      I am facing same problem. settings->manage application->running it showing my application icon running list at back end.

      Can you suggest how to solve this?

      Thanks

      — commented August 13th 2012 by Vijay Vavdiya
  • var activity = Titanium.Android.currentActivity;
    activity.finish();

    — answered January 19th 2013 by sergio ibanez
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.