Android: How to copy a SQLite database from one application to another

Posted by mahdaeng on Stack Overflow See other posts from Stack Overflow or by mahdaeng
Published on 2010-12-30T01:50:27Z Indexed on 2010/12/30 1:54 UTC
Read the original article Hit count: 537

Filed under:
|
|
|
|

I have a lite version of an application that uses a SQLite database. I want to copy that database over to the full version of the application when the user installs the full version.

I have written some code to perform the file copy, but the lite database file always comes up as unreadable. The file is there and I can point to it, but I can't read it to perform the copy.

In the Android documentation, we read:

You can save files directly on the device's internal storage. By default, files saved to the internal storage are private to your application and other applications cannot access them (nor can the user).

Note the words, "by default".

Is there a way that I can override that default and make the SQLite file readable by my other application?

Thank you.

© Stack Overflow or respective owner

Related posts about android

Related posts about file