0

How can I store the images which is taken from camera, directly to the server without storing in local system file?

I have tried to work out below:

  Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
  File photo = new File(Environment.getExternalStorageDirectory()
                    + "/Application", "IMG_temp.jpg");
  System.gc();
  intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photo));
            imageUri = Uri.fromFile(photo);
            startActivityForResult(intent, 1);

But how can I upload the image without giving path of local directory?

unor
  • 92,415
  • 26
  • 211
  • 360

1 Answers1

0

If you want a full size image then you can't. to get a full size image from the camera Activity you have to pass the Uri for saving the image.

You can get a thumbnail Image without saving it to the SD card. Take a look a this post I wrote on taking images using the camera Activity:

Use Camera Activity to get full size and thumbnail Image

Emil Adz
  • 40,709
  • 36
  • 140
  • 187