Question

How can I know when Android's MediaScanner has indexed everything? I would like to wait to show something dependent on the image and video content providers until the media scanner has done it's thing.

Was it helpful?

Solution

You need to capture Intent.ACTION_MEDIA_SCANNER_FINISHED

See: http://groups.google.com/group/android-developers/browse_thread/thread/45dbc0ef2e0ca9f1?pli=1

OTHER TIPS

The MediaScanner service does this: sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_FINISHED, uri)); when the scan is finished. Catch that Intent and you should be good.

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