如何检测屏幕镜像 [英] how to detect screen mirroring

查看:196
本文介绍了如何检测屏幕镜像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直想知道android API(或任何其他lib/framework)中是否有任何方法可以帮助我检测我的设备屏幕是使用WiDi,Miracast还是MHL镜像的,或者基本上是任何其他用于镜像您的技术的镜像屏幕.

I have been wondering if there is any way in the android API (or any other lib/framework) that can help me to detect if my device screen is mirrored using WiDi,Miracast or MHL or basically any other technique for mirroring your screen.

Br, 墨水

推荐答案

我不确定您要实现的目标,但是如果您只想禁用屏幕快照等,则可以使用FLAG_SECURE.

I'm not sure what you are trying to achieve, but if you simply want to disable screenshots and such, you can use FLAG_SECURE.

  • https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_SECURE
  • http://www.vogella.com/code/ApiDemos/src/com/example/android/apis/app/SecureWindowActivity.html

这篇关于如何检测屏幕镜像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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