删除所有近期的任务Programmaticcally [英] clear all recent task Programmaticcally

查看:135
本文介绍了删除所有近期的任务Programmaticcally的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过程序来删除所有近期的任务。之前发布的问题,我谷歌,但没有运气可言。

I am trying to remove all the recent task through program. Before posting question i google it but no luck at all.

我试图用 ActivityManager.kil​​lBackgroundProcess(pckagename),但它也不会从近期的任务列表中删除该任务。

I tried to use ActivityManager.killBackgroundProcess(pckagename), but it also does not remove the task from recent task list.

我也试过链接 <一href="http://stackoverflow.com/questions/12890415/android-how-to-clear-the-recent-task-list-which-could-get-from-home-button-in-m">Android,如何清除最近的任务列表,它可以在大多数手机得到Home键?反思是一种可能的方式是什么?

我总是

java.lang.SecurityException: Permission Denial: 
    removeTask() from pid=23297, uid=10051 requires 
    android.permission.REMOVE_TASKS

即使我已经指定清单中的 android.permission.REMOVE_TASKS 许可。

我们如何清除最近的任务列表中编程,使用户可以看到最近的任务列表最近没有任务?

How can we clear the list of recent tasks programmatically so that user can see no recent tasks in recent task list?

推荐答案

REMOVE_TASKS 签名 -level许可。它只能通过所撰写的设备固件,开发商的应用程序举行诸如设备制造商或ROM模作者

REMOVE_TASKS is a signature-level permission. It can only be held by apps written by the developers of the device firmware, such as a device manufacturer or ROM mod author.

这篇关于删除所有近期的任务Programmaticcally的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆