我正在开发一个安卓应用程序。如果我关闭我的应用程序,我的应用程序将出现在“最近的应用程序”列表中。现在我不想在“最近的应用程序”中显示它。以编程方式关闭我的应用程序后,如何将其从“最近的应用程序列表”中删除。请分享您的建议。
最佳答案
在您的 Manifest.xml
中,将以下内容设置为您的Root Activity
<activity
android:name=".Your_Root_Activity_Name"
android:excludeFromRecents="true"
....
</activity>
根据结果,您可能还必须使用 android:noHistory="true"
属性。但不确定您的情况是否需要。
有关此的更多信息:http://developer.android.com/guide/topics/manifest/activity-element.html
关于Android - 从最近的应用程序中删除应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13704782/