Code example for Camera.Parameters

Methods: getPreviewSize

    // The Surface has been created, acquire the camera and tell it where 
    // to draw. 
    camera =;// activate the camera 
    param=camera.getParameters();// acquire the parameters for the camera
    size=param.getPreviewSize();// get the size of each frame captured by the camera
    camera.setParameters(param);// setting the parameters to the camera but this line is not required
    	toServer=new Socket("",8000);// connect to server socket of Ip address at port 8000
    	outStream=new DataOutputStream(toServer.getOutputStream());}//open an outputstream to the socket for sending the image data
    catch(Exception e){
    try { 
      camera.setPreviewCallback(new PreviewCallback() { 
        // Called for each frame previewed 
        public void onPreviewFrame(byte[] data, Camera camera) {