Search code examples
androidcamerasd-card

Android Camera App - Have to Remount SD Card?


I am working on an app that uses the camera to take a picture and stores that picture on the SD Card. The problem is that after I take a save a picture, I have to unmount and remount the SD Card before I can see the picture in the Gallery app.

Should I unmount and remount the SD Card via my app, every time the user takes a picture? Is there a better solution to this?


Solution

  • You can't mount/unmount the SD card (external storage) from an app. You probably need to call media scanner to get your picture indexed. Look at here and here for pointers. There is also an sample app that comes with the SDK. BTW, what Android version are you testing on?