Code example for Camera

Methods: setPreviewDisplay

0
	SurfaceHolder.Callback surfaceCallback=new SurfaceHolder.Callback() {
		public void surfaceCreated(SurfaceHolder holder) { 
			camera=Camera.open(); 
			 
			try { 
				camera.setPreviewDisplay(previewHolder); 
			} 
			catch (Throwable t) { 
				Log.e("Photographer", 
							"Exception in setPreviewDisplay()", t); 
				Toast 
					.makeText(Photographer.this, t.getMessage(), 
										Toast.LENGTH_LONG) 
					.show(); 
			} 
		} 
		 
		public void surfaceChanged(SurfaceHolder holder, 
															 int format, int width, 
															 int height) { 
			Camera.Parameters parameters=camera.getParameters();