Camera preview screenshot
Closed this issue · 2 comments
Then i try to take screenshot from camera preview, it take black screen.
How to fix it ?
There's a very good chance that the view you're using doesn't update its drawing cache, so the method that Telescope uses to take screenshots won't work. You would have to extend TelescopeLayout
and do some hackery to get your view to draw something to the canvas when a screenshot is being taken. I've never done anything with camera previews before so I'll have to look into it.
The APIs have been updated to allow you to hook into the screenshot callback and make this work. See SampleMapsView.java for an example of how this was done for a map view.
For camera preview you'll do something very similar but will capture either the previous or next preview frame and insert it into the screenshot.