ankyl/castscreen

Compatibility with API 19

Opened this issue · 3 comments

Hi there,

I tried your library and worked perfect with API 23, now I have to use it with a Tablet running on API 19, no way to update the Tablet. What can I do? What limits your code to run on API lower than 21?

Hope you can give me some light here.

Best,

ankyl commented

Hi,

Capturing the entire screen uses the MediaProjection API, which wasn't added until API 21. If there is sufficient interest, I could write a backwards-compatible version of castscreen using the root view's getDrawingCache(). This would cast the app's screen, but wouldn't show anything when the app is sent to the background (because it doesn't have permission to capture the framebuffer).

For a good history of Android screen capture, see this stackoverflow answer.

Thanks for the answer. I kept looking and figured out that it was MediaProjection the main obstacle.
If you could add backwards-compatibility it would be great. I'm kind of new at Android so I don't think I could be of any help.

Just casting when App is open is fine (Open will be locked in Kiosk mode).

You think that with the new method for screen capture it will play fine videos and audio?

Thanks,

ankyl commented

I'll try to write an update sometime over the next few weeks. If it works, videos should play fine (there may be frame drop). Right now I don't test audio with castscreen; I might add support for audio in the future.