How to exit application

Hi,

I want to add a disclaimer to an application and if the user declines to accept the conditions want to exit the application. The API of os.exit() recommends not to use it in release code. How do I exit the application without using the os.exit().

Thanks in advance,
Ram

[import]uid: 10093 topic_id: 34411 reply_id: 334411[/import]

The main reason we recommend it not be used is that isn’t how apps run on devices these days. They go into the background and users can fast switch to them so they don’t have to restart them. An app that exits looks like it has crashed to the users.

But in your case, that sounds like a valid reason to exit the app.
[import]uid: 199310 topic_id: 34411 reply_id: 136796[/import]

Thanks for the fast response. [import]uid: 10093 topic_id: 34411 reply_id: 136818[/import]

The main reason we recommend it not be used is that isn’t how apps run on devices these days. They go into the background and users can fast switch to them so they don’t have to restart them. An app that exits looks like it has crashed to the users.

But in your case, that sounds like a valid reason to exit the app.
[import]uid: 199310 topic_id: 34411 reply_id: 136796[/import]

Thanks for the fast response. [import]uid: 10093 topic_id: 34411 reply_id: 136818[/import]