android - 如何防止 Android 中的屏幕捕获

标签 android security screenshot snapshot screen-capture

是否可以在 Android 应用程序中阻止屏幕录制?

我想开发一个 Android 安全应用程序。在那我需要检测正在后台运行的屏幕录制软件并杀死它们。我使用 SECURE FLAG 来防止屏幕截图。但我不知道是否也可以防止 Android 屏幕的视频捕获。让我知道如何防止屏幕捕获(视频/屏幕截图)。

最佳答案

我要说的是,不可能通过支持的方式完全阻止任何 Android 应用程序的屏幕/视频捕获。但是,如果您只想为 普通 android 设备阻止它,则 SECURE FLAG 是可观的。

1) 安全标志确实会阻止正常的屏幕截图和视频捕获。

Also documentation at this link says that

Window flag: treat the content of the window as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays.

以上解决方案肯定会阻止应用程序捕获您应用程序的视频

查看答案here .

2) 还有其他捕获屏幕内容的方法。

有可能在 Root设备上或通过使用 SDK 来捕获另一个应用程序的屏幕,

which both offer little to no chance of you either blocking it or receiving notification of it.

例如:存在通过 SDK 将您的手机屏幕镜像到您的计算机的软件,因此可以在那里使用屏幕捕获软件,而您的应用无法发现。

查看答案here .

getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE);

关于android - 如何防止 Android 中的屏幕捕获,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28606689/

相关文章:

security - 访问 token 和刷新 token 流程

安卓系统应用101

c++ - 在窗口中获取缩放百分比

c# - 屏幕截图质量比正常差

c - 使用 libx11 截图

android - EditText 不显示光标或软键盘

android - 获取 "Cause: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded"

node.js - 限制(沙盒)node.js 文件访问

java - Android - fragment 不显示

android - 将 onTouch ACTION_MOVE 限制为一个 View