0

In my application I am having two buttons and a surfaceview for the front facing camera.

When I start the application I can see the camera preview in the surfaceview but when my app takes screenshot of the activity its black in the portion where the surfaceview is.

so the screenshot I took is not capturing the surfaceview, and I need to do it.

Any help will be appreciated. Thanks

Megz
  • 47
  • 4
  • @CommonsWare is there any substitute that you can suggest regard to this – Megz Apr 28 '14 at 13:35
  • https://stackoverflow.com/questions/18289544/taking-screenshot-programmatically-doesnt-capture-the-contents-of-surfaceview?rq=1 – CommonsWare Apr 28 '14 at 13:36
  • Maybe this? http://stackoverflow.com/a/15197079/1748764 – Gabriel Apr 28 '14 at 13:38
  • One of those comment links should help. You can't read the contents of the SurfaceView, so you need to "draw" it somewhere else. Either by actually drawing it to a Bitmap, or by capturing the camera to a buffer (or SurfaceTexture) rather than sending it to a SurfaceView surface. – fadden Apr 28 '14 at 17:47
  • thanks I will try the solutions. – Megz Apr 29 '14 at 09:12

0 Answers0