File root = Environment.getExternalStorageDirectory();
File textFile = new File(root, "name.txt");

FileWriter writer = new FileWriter(textFile);
BufferedWriter out = new BufferedWriter(writer);
out.write("Your Data");
out.close();


This will create file in SD card

On Jul 6, 10:53 pm, Vishal <[email protected]> wrote:
> I am creating an application in Android that will read data from a
> bluetooth rs232 device and transfer the data into a graph. I am not
> going to worry about the bluetooth part yet, but i want to test the
> function of my code and app. I want to create a text file of fake data
> so i could perform this task. First off, How would i create the actual
> text file? How do i write into the Text file? and finally How would i
> read the "fake" data into my code? I am very new to Android so it
> would be much appreciated if i could get some tutorial on how to do
> this.
>
> Thank you very much in advance

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