Reputation: 4811
I have build an Android application which capture images and save in the /mnt/sdcard/Pictures/MyFolder Actually application is running perfectly and also images store in the given path. The problem is I cannot see the images till I restart the device. Can I handle the situation in my coding?
Thanks in advance.
Upvotes: 2
Views: 3442
Reputation: 10067
If what you mean is that you cannot see the images in your gallery app you can use this to fix it:
String[] paths = { "/mnt/sdcard/Pictures/MyFolder" };
String[] mediaType = {"image/jpeg"};
MediaScannerConnection.scanFile(this, paths, mediaType, null);
Upvotes: 7