Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy can't I see my taken pictures in gallery?
    text
    copied!<p>I am experimenting with the Camera on my non-rooted 4.0.4 Android device having no sd-card. I am doing some burst-shots and saving them on the internal memory.</p> <p>My problem is that my photos get stored in <code>/data/data/my.package.name/files</code> which I cannot access without root-permission. I can see the files, but they have no read-permission.</p> <p>I found some broadcast-Intent that should make them visible in the standard-gallery, but that doesn't seem to work neither.</p> <p><em>Does anyone have another idea of how I can access my photos? Or tweak the stuff I tried so far?</em></p> <p>how I save the photos:</p> <pre><code>public void onPictureTaken(byte[] data, Camera camera) { FileOutputStream outStream = null; try { Log.i(TAG, ""+Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES)); Log.i(TAG,"fotofolder is "+getFilesDir()); // write to local sandbox file system outStream = CameraDemo.this.openFileOutput(String.format("%d.jpg", System.currentTimeMillis()), 0); outStream.write(data); outStream.close(); //this intent should make fotos visible in the gallery sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.fromFile(Environment.getExternalStorageDirectory()))); // Uri.parse("file://" + Environment.getExternalStorageDirectory()))); Log.i(TAG, "onPictureTaken - wrote bytes: " + data.length); ... } </code></pre> <p>the log:</p> <pre><code>08-23 12:42:49.324: I/FrontCamera(15832): /mnt/sdcard/Pictures 08-23 12:42:49.327: I/FrontCamera(15832): fotofolder is /data/data/com.example.camera/files 08-23 12:42:49.370: I/FrontCamera(15832): onPictureTaken - wrote bytes: 430493 </code></pre> <p>&lt;--- it puts the photos to the <code>data/data...</code> folder, instead of the useful <code>mnt/sdcard/Pictures</code></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload