I tried the environment.getExternalStorageDirectory() and it created
an empty file too.

try {
  FileWriter fw = new FileWriter
(Environment.getExternalStorageDirectory().getPath() +"/
thissucks.txt");
  BufferedWriter out = new BufferedWriter(fw);
  out.write("stupiddfdsfsgfghhjkjgfdfgf");
  out.close();
  Toast.makeText(testthis.this, Environment.getExternalStorageDirectory
().getPath() , Toast.LENGTH_SHORT).show();
} catch (IOException e) {
  Toast.makeText(testthis.this, "Write Failed!",
Toast.LENGTH_SHORT).show();
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to