建议在 AndroidManifest.xml 的 activity 标签下 加入 android:excludeFromRecents="true"
ijustyce opened this issue · comments
杨春 commented
在 color os 即使加入了电池白名单,允许完全后台,但从最近任务列表中划掉后,应用依然会被杀死并重启,即使加锁也是如此。
建议在 AndroidManifest.xml 的 activity 标签下 加入 android:excludeFromRecents="true",从最近任务列表移除掉,多谢。
Nihility commented
需求不合理,作为反例,考虑其他用户有在最近任务列表显示的需求。
另外也不能确认这样改动后应用就不会被杀死。
想要这样的功能的话,建议自己编译打包。