开发者

Read / Write custom file android

In my application I have to create 4 .dat files to store some information for my app. But I have to change them in my app in "settings activity".

I created them in raw catalog: /raw/1.txt /raw/2开发者_开发问答.txt /raw/3.txt /raw/4.txt

I can read them but i can't write them.

So, where i can store a simple dat file that can be modified.


You can't write to files located in the res/raw-folder because those files are static.

Instead, you could use the "Internal Storage", as illustrated here.


I would use the phone's internal storage. This reference gives examples of reading and writing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜