Good day!
Write the application under Android which should receive the image and process it in a special way. In docks read that takePicture of the Camera class as parameters, accepts as a and, in which then transmitted data obtained during shooting (rawCallback and jpegCallback).
As a result of experiments it was found that in the jpegCallback consistently comes ready JPEG file that you can then burn to a flash drive, but in rawCallback comes null. The gugleniya does not help. Option decompress JPEG and work with it is not suitable in many aspects (speed, quality etc.)
Please tell me how to be?
PS. Tested on Google Nexus ONE and HTC Desire.
PSS. I enclose a clipping of the code:
public void TakePicture() { if (m_Camera != null && m_CanDoPhoto) { m_CanDoPhoto = false; m_Camera.takePicture(shutterCallback, rawCallback, jpegCallback); } } PictureCallback rawCallback = new PictureCallback() { public void onPictureTaken(byte[] _data, Camera _camera) { String path = Environment.getExternalStorageDirectory().toString(); File File = new File(path, "MyTestPhoto.raw"); try { FileOutputStream fOut = new FileOutputStream(file); fOut.write(_data); fOut.flush(); fOut.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } } }; PictureCallback jpegCallback = new PictureCallback() { public void onPictureTaken(byte[] _data, Camera _camera) { m_CanDoPhoto = true; m_Camera.startPreview(); } };