Wednesday, November 16, 2011

Android :connot see the image/file/video that has been saved by application on SD card

Well this thing may cause a head-storm

Scenario :
Your application has saved/write a file/picture/video that is not being reflected in the gallery.
The reason behind this is that media Scanner is not aware of the new files ..

So the Simple solution to this problem is

try Running this piece of code after u have closed your output stream after writing the file:


MediaScannerConnection.scanFile(context, new String[] { filePath+fileName }, null, null);

No comments:

Post a Comment