Question

I'm writing a (230 kb) jpeg file to the location returned by

Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getAbsolutePath()

Which on my 8.9 Kindle Fire HD is /mnt/sdcard/Pictures and I can see browsing the filesystem via eclipse that the image is saved pretty much instantly and all appears to be well. However when I open the Photos app, there is no sign of the image and it takes a variable amount of time (up to several minutes) for it to appear.

My assumption is that the Photos app checks for new pictures on a timer, is that the case? Is there any way I can notify it of a new image?

I've tried saving to other locations but that doesn't seem to have any impact.

I'm targeting 2nd gen and HD Kindle Fire devices only.

Was it helpful?

Solution

I had a similar problem on a regular Android tablet (so not sure if the Gallery on the Samsung is the same as Photos on the Kindle) but this forced a refresh without waiting or plugging in USB

sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse(
              "file://"+Environment.getExternalStorageDirectory())));

I will try and confirm that it works on the Kindle Fire HD over the weekend

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top