杀死一个Android应用程序与Home键 [英] Killing an Android App with the Home Key
本文介绍了杀死一个Android应用程序与Home键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个Android应用程序,当Home键为pressed我希望它结束。期。我不希望它挂在后台运行。我只是希望它终止。什么是做到这一点的最好还是prferred方法是什么?
I have an android app, and when the Home key is pressed I want it to terminate. Period. I dont want it hanging around running in the background. I just want it terminated. What's the best or prferred method to do this?
推荐答案
的不,你不知道。的
-
试图杀死你的应用程序是一个Android的反模式。
Trying to "kill" your app is an Android antipattern.
试图赶上HOME键的也的一个Android反模式。
Trying to catch the home key is also an Android antipattern.
有材料证实这点的大量。如果你觉得你这样做希望应用程序打死,你只是简单的错误。
There is a vast amount of material substantiating these points. If you think you do want your application killed, you're just plain wrong.
这篇关于杀死一个Android应用程序与Home键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文