AnujAroshA
AnujAroshA

Reputation: 4811

Images captured from my Android app are saved, but not displayed on the gallery app

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

Answers (1)

SERPRO
SERPRO

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

Related Questions