check the file name and be sure it's ok.

Running a modified version of your code on a 2.3.3 emulator

                File sdDir = Environment.getExternalStorageDirectory();
                sdDir.mkdirs();
                String currentTripName = "testtrip";
                File file = new File(sdDir + currentTripName + ".kml");
                FileWriter sdWriter;
                try {
                        sdWriter = new FileWriter(file, false);
                        String fileContents = "This is a test trip file";
                        sdWriter.write(fileContents);
                        sdWriter.close();

                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }

yeilds this error

06-13 12:45:03.358: WARN/System.err(1663):
java.io.FileNotFoundException: /mnt/sdcardtesttrip.kml (Read-only file
system)


maybe try

File file = new File(sdDir + "/" + currentTripName + ".kml");


-- 
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