I have two activities. In one activity, I have an ImageView and an camera button.
When I press camera button it goes to other activity where two buttons are the
try this..
String path = Environment.getExternalStorageDirectory() + "/CameraImages/example.jpg";
File file = new File(path);
Uri outputFileUri = Uri.fromFile( file );
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE );
intent.putExtra( MediaStore.EXTRA_OUTPUT, outputFileUri );
startActivityForResult( intent, CAPTURE_IMAGE );
your image will be save at this location "sdcard/CameraImages/example.jpg"