If you want to create a file on your device (or emulator), you have to
change the path.

try this:

---
File oText = new File("/sdcard", "File");
---

instead of:

---
File oText = new File("C:/Documents and Settings/.../workspace/
SocketInterface", "File");
---


P.S.: If you only want to write text into a file, your code is very
complicated!
---
FileWriter writer = new FileWriter(new File("/sdcard/text.txt"); //
catch exception...
BufferedWriter buffWriter = new BufferedWriter(writer);

buffWriter.write("android rocks");
---

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