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.
Well i don't see the problem, your user will open the app and it will be runtime and you can write what ever you want to what ever file. So this tip doesn't apply to you.
Here is the solution:
Instead of including the log file with the app you should create it on first launch.
There's more information How to create a file in Android? on creating a file.