this code create folder in SD card but not save image in that folder how i do that? is show images in defualt gellry i want to save image in my "myfolder23" not in default gellry how i did that??? how i only save camera taken images in"myfolder23" not in default gellry folder? or delete from default gellery only save in "myfolder23"???
private void startDialog() {
AlertDialog.Builder myAlertDialog = new AlertDialog.Builder(this);
myAlertDialog.setTitle("Upload Pictures Option");
myAlertDialog.setMessage("How do you want to set your picture?");
myAlertDialog.setPositiveButton("Gallery", new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {
pictureActionIntent = new Intent(Intent.ACTION_GET_CONTENT,
null);
pictureActionIntent.setType("image/*");
pictureActionIntent.putExtra("return-data", true);
startActivityForResult(pictureActionIntent, GALLERY_PICTURE);
}
});
myAlertDialog.setNegativeButton("Camera", new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {
pictureActionIntent = new
Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
String newFolder = "/myFolder23";
String extStorageDirectory = Environment.getExternalStorageDirectory().toString();
File file = new File(extStorageDirectory + newFolder);
file.mkdir();
Uri outputFileUri = Uri.fromFile(file);
pictureActionIntent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
startActivityForResult(pictureActionIntent, CAMERA_PICTURE);
}
});
myAlertDialog.show();
}