ScreenCapture via MediaProjection without user intervention in Kiosk apps - Android
Asked Answered
O

0

6

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

Outburst answered 13/6, 2018 at 15:39 Comment(3)
I'm looking at a similar problem, but we are never rooted, just device-owner. Did you find a solution?Chaddie
@AlessandroCaliaro No, but for the time being we use screenrecord and screencap command to get a snapshot, but that binary is not available on all android deviceOutburst
@RahulShyokand If you are interested, you could decompile and check how Team Viewer had done screen sharingOutburst

© 2022 - 2024 — McMap. All rights reserved.