How to use Android Internal Storage?

shiefausa

New Member
I am a beginner in java and I am building an android app.I want to have an xml file that has text in it.Whenever the server sends updates, I want to change some lines in that file (what I mean by update is changing some lines in that file by erasing the some part of the text written already and replace by the update)I know nothing about creating,writing or reading from files.When I searched I found out that Internal storage suits me best.But I do not know if I have to create an xml file manually in any directory or just use the code bellow to create this file automatically? \[code\] // If this is the first time run,execute one time code // create XML Internal store String FILENAME = "My_XML_file"; try{ FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_APPEND); } catch (final IOException e) { e.printStackTrace(); }\[/code\]Thank you in advance!
 
Back
Top