Make picture intent failed on Samsung Galaxy I9000
<p>I use the following codes to launch the camera from my app:</p>

<pre><code>private void saveFullImage() {
    String storageState = Environment.getExternalStorageState();
    if (storageState.equals(Environment.MEDIA_MOUNTED)) {
        String path = Environment.getExternalStorageDirectory().getName()
                + File.separatorChar + "Android/data/"
                + RegistrationDetails.this.getPackageName() + "/files/"
                + md5("filedummy") + ".jpg";
        File photoFile = new File(path);
        try {
            if (photoFile.exists() == false) {
                photoFile.getParentFile().mkdirs();
                photoFile.createNewFile();
            }

        } catch (IOException e) {
            Log.e(TAG, "Could not create file.", e);
        }
        Log.i(TAG, path);

        Uri fileUri = Uri.fromFile(photoFile);
        Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
        intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);
        startActivityForResult(intent, TAKE_PICTURE);
    } else {
        new AlertDialog.Builder(this)
                .setMessage(
                        "External Storeage (SD Card) is required.\n\nCurrent state: "
                                + storageState).setCancelable(true)
                .create().show();
    }
}
</code></pre>

<p>And I have the following codes in onActivityResult to show that the picture has been taken, so I can proceed the next step:</p>

<pre><code>        } else if (requestCode == TAKE_PICTURE) {
            if (data == null) {
                Toast toast = Toast.makeText(getApplicationContext(),
                        "Take Picture finished", 10);
                toast.show();
            }
</code></pre>

<p>And I have defined the following settings in AndroidManifest: android.permission.CAMERA and android.permission.WRITE_EXTERNAL_STORAGE</p>

<p>The launch Camera intent works, but when I make a picture and click on Save, then it does not return to onActivityResult and my app crashes.</p>

<p>Can someone help me with this?</p>

<p>Thanks</p>
