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
  • 9,253
  • 18
  • 84
  • 147
Dilshi
  • 513
  • 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);
aehs29
  • 939
  • 5
  • 9
  • 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 – aehs29 Jul 18 '13 at 17:16