2

I was working on some camera stuff in android and i get some tutorials.

For my needs i get the following code to be used:

Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); 
startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST);

But using this when i capture the image, this Intent automatically stores the Image in my SD CARD. but i dont want it to store it to my SD CARD because i am storing that image to some other place/folder in SD Card. So is it possible in here that i can stop this intent to store the image into SDCard automatically.

Please Friends Help

Shah
  • 4,990
  • 10
  • 48
  • 70

1 Answers1

0

use this . It will save the image to any myfolder in your SDCard.

String imageFilePath = Environment.getExternalStorageDirectory().getAbsolutePath()
+ "/myfolder/myfavoritepicture.jpg";
File imageFile = new File(imageFilePath);
Uri imageFileUri = Uri.fromFile(imageFile);
Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
i.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, imageFileUri);
startActivityForResult(i, CAMERA_RESULT);
Sujit
  • 10,512
  • 9
  • 40
  • 45