Question

i want to scan the sdcard images to display images in my application. When i taken the picture from camera i am able to save the images in sdcard from the application, but not able to show them. But when i copy the image manually in the phone sdcard media scanning is running and i am able to show the images. My question is, is there any way to median scan the sdcard through coding?

Was it helpful?

Solution 2

This is working for me to scan the sdcard it is working in my mobile:

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

OTHER TIPS

I think that this class may help you with what you're trying to do.

By calling scanFile you can ask to the scanner to check your newly created file.

Hope it helps.

Jokahero

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