how to create and save a screenshot from a surfaceview?

I hope you have used this solution which was posted here Get screenshot of surfaceView in Android this thing is explained here Take Screenshot of SurfaceView The SurfaceView’s surface is independent of the surface on which View elements are drawn. So capturing the View contents won’t include the SurfaceView……… I hope this Taking screenshot programmatically … Read more

Custom camera android

Use this code PreviewDemo.java public class PreviewDemo extends Activity implements OnClickListener { private SurfaceView preview = null; private SurfaceHolder previewHolder = null; private Camera camera = null; private boolean inPreview = false; ImageView image; Bitmap bmp, itembmp; static Bitmap mutableBitmap; PointF start = new PointF(); PointF mid = new PointF(); float oldDist = 1f; File … Read more

How to play multiple video files simultaneously in one layout side by side in different view in Android

You are not giving an awful lot of specifics on what exactly you have tried and what the problematic areas are, so I just made a small test to see if I could reproduce any of what you’re describing. I do not have any conclusive findings, but can at least confirm that my Galaxy Nexus … Read more

How to capture image from custom CameraView in Android?

try to use Surface View for creating dynamic camera view and set in your required portion. following code try variables set Class level (Global) Button btn_capture; Camera camera1; SurfaceView surfaceView; SurfaceHolder surfaceHolder; public static boolean previewing = false; Following code in onCreate() method getWindow().setFormat(PixelFormat.UNKNOWN); surfaceView = new SurfaceView(this); surfaceHolder = surfaceView.getHolder(); surfaceHolder.addCallback(this); surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); btn_capture = … Read more

Taking screenshot programmatically doesnt capture the contents of surfaceVIew

I finally solved this . Below i give some code for anyone who wants to know how to take screenshots of a layout ,pictures from the camera without intent, screenshots(sort of) of the content of a surfaceView and save the screen shot in a folder : public class Cam_View extends Activity implements SurfaceHolder.Callback { protected … Read more