0
    private void takeNewPicture() {  

    Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);  

    ContentValues values = new ContentValues(3);  

    values.put(MediaStore.Images.Media.MIME_TYPE, "image/jpeg");  
    cameraImagePath = getContentResolver().insert(  
    MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);      
    //  cameraImagePath=  cameraImagePath+"/temp";  
    takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, cameraImagePath);  
    startActivityForResult(takePictureIntent, 1);  
}  

i used above code to capture and save image.but i need to change the path where file is saved(In SD CARD).

rahulserver
  • 10,411
  • 24
  • 90
  • 164
Dilshi
  • 543
  • 3
  • 7
  • 17

1 Answers1

0

Use:

//SD card "root" directory
File path = Environment.getExternalStorageDirectory();

or

//SD card directory for pictures
File path = Environment.getExternalStoragePublicDirectory(
        Environment.DIRECTORY_PICTURES);
ah008a
  • 1,115
  • 6
  • 11
  • hello i wud be more glad if you can eloborate the answer.because i m new to android – Dilshi Jul 18 '13 at 17:08
  • I think this answer should be helpful: http://stackoverflow.com/questions/1910608/android-action-image-capture-intent – ah008a Jul 18 '13 at 17:16