Why does my code to write to the sdcard work on one device but not on another device..?
<p>Here is my code: The file never gets created on the SDCARD</p>

<pre><code>if (!Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()))
{
  logger.info("There is no external SD card mounted...stopping application");
  Toast.makeText(MonitorService.this, "There is no external SD card mounted...stopping application", Toast.LENGTH_SHORT).show();
  return;
}

final File root = Environment.getExternalStorageDirectory();
final File binaryfile = new File(root, "test.log");

      writer = new FileWriter(binaryfile, true);
      out = new BufferedWriter(writer);

      if (root.canWrite())
      {
         System.out.println("I do see this in the logs....");
         out.write("This is a test");
         out.write("\n");
         out.close();
         writer.close();
      }
</code></pre>
