Clear all recent tasks Programmatically

前端 未结 4 1844
别跟我提以往
别跟我提以往 2020-12-11 23:27

I am trying to remove all recent tasks through a program. Before posting a question, I googled it, but no luck at all.

I tried to use ActivityManager.killBackg

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-11 23:46

    I just met with the same problem. My duty was to remove a 3th party app from recent list.

    Okay, I don`t know how clear the recent list, but I know, how not to put your app there. start it with: FLAG_ACTIVITY_NO_HISTORY flag .

    This worked for me, I hope I can help with it for you. details: min SDK level 14

    Cheers,

提交回复
热议问题