title: android intent for sdcard ready
body: <p>I have an application that uses a file on the SD card, the application runs when the phone boots, and it has become apparent that the file cannot be accessed when the program is first run as it starts working before SD card is avaliable. </p>
  
  <p>Is there an broadcast receiver I can use to tell when the SD card is ready?</p>
  
  <p><strong>Update</strong></p>
  
  <p>Just to summarise the answer to register the intent do:</p>
  
  <pre><code>IntentFilter filter = new IntentFilter (Intent.ACTION_MEDIA_MOUNTED); 
  filter.addDataScheme("file"); 
  registerReceiver(this.mSDInfoReceiver, new IntentFilter(filter));
  </code></pre>
  
  <p>and create a broadcast receiver to react to it:</p>
  
  <pre><code>private BroadcastReceiver mSDInfoReceiver = new BroadcastReceiver(){
      @Override
      public void onReceive(Context arg0, Intent intent) {
      // Code to react to SD mounted goes here
      }
   }; 
  </code></pre>