How to write to a file saved in local folder in Android
I am having a file in the folder res/raw/a.xml. I want to write some data to this file? How it can be done in Android? How can we access a file stored in 开发者_如何学编程local directory in order to write data to that file.
can anyone help me in sorting out this issue ? Thanks in Advance,Hi, I am having a file in the folder res/raw/a.xml. I want to write some data to this file? How it can be done in Android?
You cannot modify a resource at runtime, sorry.
How can we access a file stored in local directory in order to write data to that file.
Use getFilesDir()
to get a File
object pointing to your app's local directory. Then, use standard Java I/O.
精彩评论