Android: How to quit the whole application programatically?

You must Login before you can answer or comment on any questions.

Is it possible to call something like Titanium.App.quit() and this to actually close the application?

The problem is that I have a window that's created in the app.js with the following parameters

var winHomeScreenOptions = {
    url: 'home_screen.js',
    backgroundColor: '#FFFFFF'
}
 
if (Titanium.Platform.name == 'android') {
    winHomeScreenOptions.navBarHidden = true;
}
Titanium.UI.createWindow(winHomeScreenOptions).open();
and when I press "back" button, I see the "Splash" screen, and have to press "back" again ... If I don't set navBarHidden to true, then I have to hit "back" only once.

Is there a way to quit the app with a code?

Thanks!

1 Answer

Your Answer

Think you can help? Login to answer this question!