'm using following code to copy sqlite file from asset folder to database folder. i found this example here find CommonsWare's answer in this question
But im getting java.io.FileNotFoundException: /file:/android_asset/pg558.sqlite (No such file or directory)
void copy() throws IOException {
InputStream in =getApplicationContext().getAssets().open("pg558.sqlite");
OutputStream out = new FileOutputStream("data/data/com.mireader/databases/MIBOOK");
// Transfer bytes from in to out
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
in.close();
out.close();
}