且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何关闭一个Android应用程序?

更新时间:2021-08-12 06:48:30

如果有某种严重错误,那么你应该要对付它在你的code而不是试图重新启动应用程序。

If there is some kind of "critical error", then you should should deal with it in your code rather then trying to restart the application.

您无法在关机的Andr​​oid应用程序,但是你的活动一度全部关闭(你可以用编程的Activity.finish()方法一样),那么你的应用程序被认为是关闭的。

You cannot shutdown an application in Android, however once all of your Activities are closed (which you can programatically do with the Activity.finish() method), then your application is considered to be closed.