问题
When user presses the back button, titanium application gets closed. But the application can be viewed in cached processes list (under settings-->applications-->running services-->menu pressed-->show cached processes). I want my application to get killed completely when it gets closed. (Just FYI, I am using titanium android module.) Any help?
回答1:
There is a boolean property on the window for Android only. Before opening the window, set win.exitOnClose = true;
回答2:
Don't do that. Chez Android, quitting your application is considered bad practice. Users don't "quit" your app, they navigate away and may decide to return, and expect to find it in the same state they as left it. If you are going to depart from this nearly universal usage paradigm, you should have an extremely good reason.
来源:https://stackoverflow.com/questions/9739776/titanium-android-close-application-completely-no-caching