如何改变最近的应用程序列表中显示的快照?快照、应用程序、最近、列表中

2023-09-04 03:50:47 作者:一生热爱不回头

在较新的Andr​​oid版本(> 3.0)的有一个屏幕上的按钮 将显示与他们的名字和快照的最新的应用程序的列表。 虽然我的应用程序本身有密码保护,本概述可能 表明在该快照敏感数据。那么,有没有办法强迫 某些图像(如标志)中显示,而不是让操作系统决定的吗?

In the newer versions of Android (> 3.0) there is an onscreen button that will display a list of the recent apps with their names and snapshots. Even though my app itself is password protected, this overview might show sensitive data in that snapshot. So is there any way to force a certain image (like a logo) to be shown rather than let the OS decide?

推荐答案

这似乎是不可能的了。有一个叫 onCreateThumbnail 方法,但它不是目前使用的系统我猜,因为它不叫。我看到两种可能的解决方案: 1.要在加入 FLAG_SECURE 到你的窗口包含敏感数据的活动禁用缩略图: getWindow()addFlags(WindowManager.LayoutParams.FLAG_SECURE)​​。 2.通过设置安卓排除近期应用程序的活动:在AndroidManifest.xml中excludeFromRecent 属性的活动

It seems to be impossible for now. There's a method called onCreateThumbnail but it is not used currently by the system I guess, since it is not called. I see two possible solutions: 1. To disable thumbnail on the activity containing sensitive data by adding FLAG_SECURE to your window: getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE); 2. To exclude your activities from recent apps by setting android:excludeFromRecent attribute for activities in AndroidManifest.xml