如何在Android中防止屏幕捕获 [英] How to prevent Screen Capture in Android

查看:153
本文介绍了如何在Android中防止屏幕捕获的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Is it possible to prevent the screen recording in Android Application?

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

I would like to develop an Android Secure Application. In that I need to detect screen recording software which are running background and kill them. I have used SECURE FLAG for prevent screenshots. But I dont know is it possible to prevent Video capturing of Android Screen also. Let me know how to prevent screen capturing (video / screenshots).

推荐答案

我要说,不可能通过支持的方法完全阻止任何Android应用的屏幕/视频捕获.但是,如果您只想针对 normal 安卓设备阻止它,则SECURE FLAG非常重要.

I'm going to say that it is not possible to completely prevent screen/video capture of any android app through supported means. But if you only want to block it for normal android devices, the SECURE FLAG is substantial.

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

1) The secure flag does block both normal screenshot and video capture.

此链接上的文档表示

Also documentation at this link says that

窗口标记:将窗口内容视为安全内容,防止其出现在屏幕截图中或在非安全显示器上查看.

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

Above solution will surely prevent applications from capturing Video of your app

此处中查看答案.

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

2) There are alternative means of capturing screen content.

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

It may be possible to capture the screen of another app on a rooted device or through using the SDK,

这两种方法几乎都不会给您提供阻止或接收通知的机会.

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

例如:存在用于通过SDK将手机屏幕镜像到计算机的软件,因此可以在其中使用屏幕捕获软件,而您的应用程序无法发现该软件.

For example: there exists software to mirror your phone screen to your computer via the SDK and so screen capture software could be used there, undiscoverable by your app.

此处查看答案.

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

这篇关于如何在Android中防止屏幕捕获的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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