I'm currently looking to build a backup feature in my Android application. However I'm kinda struggling before even starting to implement it because I'm not sure what the correct way to go is.
I found some interesting articles on the net and so I came up with three possible solutions:
- Backup the entire DB file to the SD card
- Export the DB-data to an XML file on the SD card
- Use the Android backup mechanism to backup the entire DB to the Google cloud
Now I was wondering what you guys think about these 3 solutions, or do you know another (maybe an even better way to go) and what is in your eyes the best way to go?
Here are my remarks on the possible implementations:
- I don't know if the phone isn't rooted that it's possible to restore the DB file... Otherwise there aren't really any down sides for this I think...
- Handling XML files on the fly on Android phones is heavy so if it can be avoided it's best not to do it like that
- Using the Android backup mechanism the backup feature is only available if it's enabled by the user on the phone, and all the data should be copied to the cloud... Which in my case can be in some cases quite a lot...
I'm looking forward to see some input on this issue!
Thanks in advance!
Kr,
Dirk