Titanium Community Questions & Answer Archive

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

how to detect application termination to store data on exit?

Hi Experts,

How to detect application termination to store data on exit and retrieve it on next start.

which event I should listen to??

Thanks in advance.

— asked August 19th 2010 by Chirag Patel
  • application
  • close
  • data
  • exit
  • iphone
  • store
  • termination
0 Comments

2 Answers

  • I don't think you can do this on iphone
    Try to intercept the CLOSE event but I'm not sure it works on iphone

    win.addEventListener(Titanium.CLOSE, function(e){
    ....
    

    I think the best way it's so save the data on each step your user does ( ofcourse if it's not too often ) and you will have it on the next start.

    — answered August 19th 2010 by Dan Tamas
    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
    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.