ScreenCapture via MediaProjection without user intervention in Kiosk apps - Android
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