I am developing an android application with inbuilt SQLite database. I need to replace SQLite database file only every 3 months. while doing this I should not alter any part of code.
Also I don't want to do this as upgrading application where changing app version I can replace old application with newer version and new database.
For example if I give a button "Update Database" and after clicking this button only database file is replaced using internet and other parts of application remains intac开发者_Python百科t.
simply do as you'd do with any file:
- Download the database file from a web server to the devices temp directory (or cache or SDCard)
- Move that file to your application's data directory
To do that automatically, you should use a service started by the AlarmManager.
精彩评论