title: How to check if sendBroadcast has finished his job
body: <p>I got little problem. I'm refreshing my sdcard using:</p>
  
  <pre><code>sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Environment.getExternalStorageDirectory()))); 
  </code></pre>
  
  <p>and I have created <code>ProgressDialog</code> with a spinner which pops out at the start ("at the start" - I mean after sendBroadcast method), and after successful refresh I would like to dismiss it, but I got no idea how to check that <code>MediaScanner</code> finished his job. I tried using <code>BroadcastReciver</code> and <code>sendStickyOrderedBroadcast(...)</code>, but its seems it was wrong idea...</p>
  
  <p>I can't use <code>MediaScannerConnection</code> and <code>OnScanCompletedListener()</code> 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</p>