Q:

How to store and get internal app data from file in Android?

I am writing a simple Android Sudoku app, during the first stage, I want to store some Sudoku puzzle in a file and then get them. The file is a simple xml file, it's format just like:
<puzzle>23000...31</puzzle>
<puzzle>45013...67</puzzle>

There are 9 * 9 character in "puzzle" tag.
My question is, what's the correct directory for the file, and how to get the data from it?

A:

You can store your file in assets directory or even raw directory. Honestly, I would advise you to use the first solution: you will then be able to use inside your code:
getAssets().open(fileName)

"assets" directory has to be at the root of your project (same level as ""src", "res", "libs"...
"raw" directory has to be inside the "res" one.

