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

查看:59
本文介绍了如何在 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 应用程序的屏幕/视频捕获.但是,如果您只想为普通 android 设备阻止它,那么 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.

还有此链接的文档说

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

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

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

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

此处查看答案.

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

2) There are alternative means of capturing screen content.

可以在有 root 权限的设备上或通过使用 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天全站免登陆