ScreenCapture via MediaProjection without user intervention in Kiosk apps - Android

爱⌒轻易说出口 提交于 2019-12-07 17:04:13

问题


I work for a digital signage company which has Android devices running in kiosk mode. Lately, we wanted to add screen capture for debugging. The easiest way to do that was to use

getWindow().getDecorView().getRootView().getDrawingCache()

to create bitmap and to send it over the network, but this will not capture videos as it's been rendered in surface view.

MediaProjection's createVirtualDisplay seems promising, but the explicit permission needed to use this feature is not acceptable. Even requesting user permission for the first time and persisting the result for further use is not acceptable as this will disrupt the existing implementations.

Please help me out in addressing this issue.

Note: All the devices out there, are either rooted or, our app runs as device owner and, the android version is above 4.4

来源:https://stackoverflow.com/questions/50841207/screencapture-via-mediaprojection-without-user-intervention-in-kiosk-apps-andr

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