anwesh Gamenexa
anwesh Gamenexa

Reputation: 9

How can a device take a screenshot while Using the camera? We are unable to capture a surfaceview

I'm trying to take a screenshot while using the camera, but it's not happening.
I Searched a lot to find out a solution, but none of the answers gave me exact solution.

My Question is: how can a real Android device (any brand and any model) take a screenshot while using the camera if we're unable to capture a surfaceview?

Upvotes: 0

Views: 61

Answers (1)

Rutvik Bhatt
Rutvik Bhatt

Reputation: 3295

Sorry you can't. The SurfaceView associated to the camera is hardware accelerated so it won't show in your screenshot.

The only solution I came across is to get the preview from the camera and paint it in the SurfaceView programmatically as per this link. Then the screenshot will work.

Upvotes: 2

Related Questions