I am developing an Android app that uses an SQLLite database for storage. As it is, everything works fine; however, upon request of the organization I am developing for, I need to be able to keep this database current without
touching the application code. Here are my current thoughts on this:
Using a method such as expressed here
, I would 'bundle' that app with a .db file to start with. This should not be a problem. My issue is how to update it.
Personally, what I would like to do is have the .db file stored on a remote server. When the database is updated, the application will download the 'new' db file, replace its existing one (the one it was bundled with), and then apply the same method used to initially create the database to create the updated one (that is copying the .db file's contents). However, I have two questions about this:
1. Where would I put the original .db file and the updated ones? They would need to be in the same location so that the new would override the old, but where would this be? If my understanding is correct, assets cannot be modified after the application is compiled so I do not believe storing it under the asset folder would work.
2. Once the new/updated database file has been downloaded, how would I indicate to the application that it needs to recreate/update its internal (for lack of better term) database?
Please let me know if you need more details or if anything is unclear. Thanks so much!
What I have tried:
Nothing much yet - I am still planning it all out.