In a fragment I have a Texture View displaying the camera preview and on the top of that I draw several other views.
My goal is to record a short video of what the user sees (all views) or save several screenshots to compile later into a video.
Since I don't want any disclaimer to show up and Intent associated, I don't want to use MediaProjection.
I've tried many things but all either don't work or take screenshot/record all views except for the TextureView, which turns out black in the outcome. Note that I don't wish to use MediaRecorder either because it'll only allow me to record the textureview and I want all of the contents to be recorded/screenshot.
I understand that this is the reason TextureView comes out black.
I have actually managed to get screenshots with the PixelCopy api, particularly this call, but minimum sdk version is 26 and I needed a solution to work for minimum 24 sdk version, otherwise it would be an option for me... Also, the ideal scenario would be getting a video and not the frames for later making the video.
So, can anyone point out the better way of doing this? I'm currently not seeing any alternatives...
Again, I want to give the user a small video of the entire screen display (all views).
Thanks a lot in advance!