简体   繁体   English

是否可以让后台进程检测屏幕捕获

[英]Is it possible to have a background process detect screen capture

I want to build n app that detects when the user takes a screenshot then get the image and use it. 我想构建一个n应用程序,以检测用户何时截屏,然后获取图像并使用它。

Is it possible without root? 没有root可能吗? My idea is very crude. 我的想法很粗糙。 the app will scan the screenshots holder for changes every second but that is very inefficient. 该应用程序将每秒扫描屏幕截图持有者以查找更改,但这效率很低。 is there another way? 还有另一种方法吗?

I don't think there is no supported way of doing that. 我认为没有支持的方法。 You could try the FileObserver class though and watch for events. 您可以尝试使用FileObserver类并观察事件。 Look here: https://developer.android.com/reference/android/os/FileObserver.html 在这里查看: https : //developer.android.com/reference/android/os/FileObserver.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM