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.
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.
You need to capture Intent.ACTION_MEDIA_SCANNER_FINISHED
See: http://groups.google.com/group/android-developers/browse_thread/thread/45dbc0ef2e0ca9f1?pli=1
精彩评论