The os.exit() call does the equivalent of doing an “End Process” via the Task Manager. That is, you’re killing the app in a not-so-nice way. I don’t recommend that you use os.exit().
On iOS, setting up your app to exit itself is considered bad practice and may cause your app to be rejected by the app reviewers.
On Android, having your app exit itself is allowed. Especially if you override the Back key. However, instead of calling os.exit(), you should call the following function instead…
[lua]native.requestExit()[/lua]
This will call Android’s Activity.dismiss() method on the Java side, which will exit the Corona app gracefully. Please note that the native.requestExit() function is not supported on iOS and the Corona Simulator. This function will do nothing on those platforms, which is by design.
I hope this helps! [import]uid: 32256 topic_id: 20383 reply_id: 79914[/import]