It might take a long time, so I might need to show a progress bar. How to notify the user that a backup is in progress and the database is locked. I have no idea how to close them from such a singleton class outside of my app's workflow. If I really need to do it myself up to the SQL level, then I'm worried about the following topics: I did see a mention in the docs about databases advising to use a custom BackupAgent but it does not seem related: Please also note I'm not talking about some sqlite database I manage myself, nor about backing up to SDcard, own server or elsewhere. Apart from that my test strategy was based on. Note that this is all after an install, and before first launch of the app, after the restore has been performed. ![]() Yet, the db file itself is never created. However when I test my new implementation in the emulator-2.2, I see a backup being performed to LocalTransport from the logs, as well as a restore being performed (and onRestore() called). I have implemented a similar solution for the SharedPreferences successfully in a different app in the past. db file in " /databases/", introduced locks around any db operation (such as db.insert) in my ContentProviders, and even tried creating the " /databases/" directory before onRestore() because it does not exist after install. Hence I used the FileBackupHelper, pointed it to my. There is no BackupHelper specifically for these typical databases. However the docs aren't clear on what to do. ![]() This is the database you typically use along with ContentProviders and which resides in /data/data/yourpackage/databases/. ![]() I have implemented a BackupAgentHelper using the provided FileBackupHelper to backup and restore the native database I have.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |