private void importDatabase(String inputFileName) throws IOException
{
InputStream mInput = new FileInputStream(inputFileName);
String outFileName = YOUR_DB_PATH_HERE;
OutputStream mOutput = new FileOutputStream(outFileName);
byte[] mBuffer = new byte[1024];
int mLength;
while ((mLength = mInput.read(mBuffer))>0)
{
mOutput.write(mBuffer, 0, mLength);
}
mOutput.flush();
mOutput.close();
mInput.close();
}
を働いている
/data/data/<YOUR PACKAGE NAME>/databases/
このパスにダウンロードマネージャを使用してURLからDBファイルをダウンロードし、ファイルをコピーすることができ編集:
あなたはそれが役に立ちます:
How to use an existing database with an Android application
http://stackoverflow.com/questions/9109438/how-to-use-an-existing-database-with-an-android-application/9109728#9109728 –