title: Android camera activity doesn't return to my app when the OK button is pressed
body: <p>I have an app that's fully working. It just has 1 problem with my Camera Intent or permissions.</p>
  
  <p>The app is supposed to launch the Camera Activity when the user presses a button. That's working fine, but when the user accepts a picture by clicking the OK button on the camera, it doesn't come back to my app. If they press the cancel button on the camera, it comes back to my app as expected.</p>
  
  <p>I have read all the similar questions I can find on here, but none of them have fixed my problem. I need to tell the camera exactly where to save the image because I want to alternate between 2 in my app. Here's the code that creates the Camera Intent and starts it:</p>
  
  <pre><code>Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
  intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, Uri.parse(imagePath));
  startActivityForResult(intent, 11);
  </code></pre>
  
  <p>I have tried multiple values for <code>imagePath</code> (which is a String), but the camera's OK button has not worked with any of them. These are the paths I've tried:</p>
  
  <pre><code>/mnt/sdcard/&lt;appName&gt;/cameraImages/image1.jpg
  from Environment.getExternalStorageDirectory()
  
  /mnt/sdcard/Android/data/&lt;appPkg&gt;/cache/&lt;appName&gt;/cameraImages/image1.jpg
  from context.getExternalCacheDir()
  
  /mnt/sdcard/Android/data/&lt;appPkg&gt;/cache/&lt;appName&gt;/cameraImages/image1.jpg
  from context.getCacheDir()
  </code></pre>
  
  <p>I have the following permissions in my manifest file:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.CAMERA" /&gt;
  &lt;uses-feature android:name="android.hardware.camera" android:required="false" /&gt;
  &lt;uses-feature android:name="android.hardware.camera.autofocus" android:required="false" /&gt;
  &lt;uses-feature android:name="android.hardware.camera.flash" android:required="false" /&gt;
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  </code></pre>
  
  <p>Can you guys help me figure out what's wrong with my code, or tell me what a valid path could be? I prefer if the image is stored in a cache location because it's not important for the image to continue existing after the user leaves the application, but I don't really care who has access to the image.</p>
  
  <p>I'm doing all testing on the 4.1 emulator, compiling with the 4.1 SDK, and my minimum version is API 8 (2.2).</p>
  
  <p>I have put a case for the intent in <code>onActivityResult()</code>, but I don't think you guys need to see that code because it shouldn't be affecting the problem.</p>