I want to upload an image to server in the form of Byte array.. Here I am using surface view and 'Take Picture' button, when user click a take picture button, then
    TakePicture.setOnClickListener(new OnClickListener() {
    public void onClick(View v) {
        // TODO Auto-generated method stub
        camera.takePicture(null, null, callback);
    }
});
and pictureCallback is:
       PictureCallback callback = new PictureCallback(){
 public void onPictureTaken(**byte[] data**, Camera camera) {
  // TODO Auto-generated method stub
     try {
            //async task for storing the photo
         Log.i("Picture Taken.", "Picture Taken.");
            new SavePhotoTask(CameraPreviewActivity.this, data).execute();
        } catch (final Exception e) {
            //some exceptionhandling
            Log.i("Save Photo exception",e.getMessage());
        }
}}; Now here I am using this byte array 'data'
and I want to send this image in the form of byte[] to web server..
What should I do for this??
 
     
    