Application exitEvent


Hi All,
I want to trigger an event when application has been killled in native script.
I have added the following code .
application.on(application.exitEvent, function (args) {
if ( {
// For Android applications, is an android activity class.
console.log("exit Activity: " +;
} else if (args.ios) {
// For iOS applications, args.ios is UIApplication.
console.log("exit UIApplication: " + args.ios);

but the event was not triggering in app.js file all other events are triggering except this exit event like( suspend, launch, resume)


Please be more detailed when you raise a issue.

  • Which platform you are testing (iOS / Android / both)
  • What framework you are using (Core / Angular / Vue)
  • What is the version of nativescript


I had a quick test with playground, seems the exit events are working as expected in both platforms.


I want kill event not exit event(exit event means back button).


I suggest you be clear on your statement and what you exactly need first.

If you need back button event then use activityBackPressed, I’m not sure why you even have to create this post about exitEvent.