I got little problem. I'm refreshing my sdcard using:
- Code: Select all
sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://"+Environment.getExternalStorageDirectory())));
and I would like to create ProgressDialog with a spinner which pops out at the start and after successful refresh to dismiss it, but I got no idea how to check that MediaScanner finished his job. I tried using BroadcastReciver and sendStickyOrderedBroadcast(...), but its seems it was wrong idea...
I can't use MediaScannerConnection and OnScanCompletedListener() because I don't have direct paths to the files (in some situations, it doesn't exist).
Does anyone have any idea how to solve my problem? I have run out of ideas :'(
Thanks in advance,