The only way to capture SurfaceView content is to render in it using OpenGL. You can use glReadPixels () to capture the contents of a surface. If you draw a SurfaceView using Canvas, you can simply create a bitmap, create a new canvas for that bitmap, and execute your drawing code with a new Canvas.
source share