Android record screen but only specific 'layers'/views

老子叫甜甜 提交于 2019-12-04 13:09:49

Preventing a layer from appearing in recordings can be done by setting the "secure" flag. See for example the "multi-surface test" in Grafika, which sets the flag on one of its SurfaceViews.

You will configure a virtual display to only show your app's own windows if you use createVirtualDisplay() directly, rather than going through MediaProjectionManager. Because you're creating a display for your own content, the user permission dialog is not shown. See for example the tests for DisplayManager#createVirtualDisplay().

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!