Code example for Camera.Parameters

Methods: getPreviewFormat, getPreviewSize

	public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
		 mHolder.setFixedSize(w, h);
        // Start the preview 
        Parameters params = mCamera.getParameters();
        previewHeight = params.getPreviewSize().height;
        previewWidth = params.getPreviewSize().width;
        previewFormat = params.getPreviewFormat();
        // Crop the edges of the picture to reduce the image size 
        r = new Rect(100, 100, previewWidth - 100, previewHeight - 100);
        mCallbackBuffer = new byte[460800];
        mCamera.setPreviewCallbackWithBuffer(new PreviewCallback() {
            public void onPreviewFrame(byte[] imageData, Camera arg1) {
            	if (!busyProcessing) {
            		busyProcessing = true;
Connect your IDE to all the code out there  Get Codota for Java