android使用finish()和System.exit()退出应用程序的理解
2010-12-09 09:28
363 查看
I'm new in Android!!
this.finish() in Activity only stop and destroy this activity, application still staying background (check by hold HOME button)
I used:
System.exit(0);
but it still appear there!
That's how Android works. The user/developer is not given any way to actually exit the application. When you call 'finish', the application stack is just pushed to the background. It still exists in the memory. Android itself decides when to close the application(i.e. remove its instance from the memory) and generally this is done when your application becomes the oldest application which was not used for the longest time.
this.finish() in Activity only stop and destroy this activity, application still staying background (check by hold HOME button)
I used:
System.exit(0);
but it still appear there!
That's how Android works. The user/developer is not given any way to actually exit the application. When you call 'finish', the application stack is just pushed to the background. It still exists in the memory. Android itself decides when to close the application(i.e. remove its instance from the memory) and generally this is done when your application becomes the oldest application which was not used for the longest time.
相关文章推荐
- android使用finish()和System.exit()退出应用程序的理解
- 关于Android开发中使用System.exit(0)的问题(如写返回键响应时用到双击退出函数的时候)
- android 完全退出应用程序 使用ExitApplication.
- 关于按返回键退出App之finish()与System.exit(0)结合使用
- Android中使用System.exit(0)退出后app又重新启动
- android中finish和system.exit方法退出的区别
- Android关于finish()与System.exit()都不能退出应用的原因
- android 退出选项 System.exit(0)和finish()的区别
- Android退出APP,finish()与System.exit(0)
- android使用广播退出应用程序
- 在Android中使用 ”堆栈法“来完全退出应用程序
- android Activity类中的finish()、onDestory()和System.exit(0) 三者的区别
- android开发时,finish()跟System.exit(0)的区别
- 【安卓开发】-合理使用finish() onDestroy() 和System.exit()
- android开发时,finish()跟System.exit(0)的区别(转)
- android 使用多个Intent 进行activity跳转 而没有finish的情况,如何直接退出系统
- Android finish onDestory system.exit(0)
- android Activity类中的finish()、onDestory()和System.exit(0) 三者的区别
- 关于android应用程序使用ActivityManager退出的问题
- android中finish()与system.exit(0)的区别?