I want to include a static log file within my app. Whenever the user starts the app, a time with extra information will be appended to that file. At the beginning, I thought storing the file into assets folder or raw folder would be the solution, but then I looked into android documentations where it states:
Tip: If you want to save a static file in your application at compile
time, save the file in your project res/raw/ directory. You can open
it with openRawResource(), passing the R.raw. resource ID.
This method returns an InputStream that you can use to read the file
(but you cannot write to the original file).
How can I solve this problem?
EDIT:
I want the log file not to be removed on closing the app.
Here is the solution: