I think that this is rather easy question. I am too young in android stuff already. I want to prepare application which will be using database. In every example I\'ve shown,
put your filled database in Package's Asset directory,
at application runtime just copy that database to application's internal storage like
data/data/<package name>/database
directory.
EDIT: this for copy database from asset directory to database directory,
private void copyDataBase() throws IOException {
try {
// Open your local db as the input stream
InputStream myInput = myContext.getAssets().open("your Database file name");
// Path to the just created empty db
String outFileName = "/data/data/<package name>/databases/";
OutputStream myOutput = new FileOutputStream(outFileName);
// transfer bytes from the inputfile to the outputfile
byte[] buffer = new byte[1024];
int length;
while ((length = myInput.read(buffer)) > 0) {
myOutput.write(buffer, 0, length);
}
// Close the streams
myOutput.flush();
myOutput.close();
myInput.close();
} catch (Exception e) {
Log.e("error", e.toString());
}
}