开发者

Know when media scanner is done working

开发者 https://www.devze.com 2023-03-06 17:33 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号