1

Is it possible to record the contents of any View the same way that recording the screen is possible? Does the media projection API have a way to project a specific View?

jjxtra
  • 20,415
  • 16
  • 100
  • 140
  • "Does the media projection API have a way to project a specific View?" -- no, because it works at the system level, well below where you deal with things like `View`. "Is it possible to record the contents of any View the same way that recording the screen is possible?" -- if by record you mean an MP4, not really. If the `View` is not moving, use the media projection APIs to record the whole screen, then crop the resulting video to only show the portion that you need. – CommonsWare Dec 03 '15 at 23:33
  • Interesting idea. The view can be moved and scaled unfortunately. If the View is a surface view does that change anything? – jjxtra Dec 04 '15 at 02:55
  • You might be able to basically implement a "tee" and have the content sent both to the surface and to something else to record a file. I suggest that you poke around [fadden's answers](https://stackoverflow.com/users/294248/fadden?tab=answers), such as [this](https://stackoverflow.com/a/27824250/115145) and [this](https://stackoverflow.com/a/25086739/115145) and [this](https://stackoverflow.com/a/19105030/115145) for ideas. – CommonsWare Dec 04 '15 at 12:03

0 Answers0