简体   繁体   中英

Android application backup and restore?

For the application I'm creating, I'd like users to be able to backup their application data (to an SD card for instance). What I mean by application data is the preferences and SQLite database. I'd also like to make it possible to restore the data.

Is it possible to do this with BackupManager? If yes, can someone give me a simple example.

BackupManager is for saving your data to the cloud. To have something backed up to the SDcard, you could write some kind of a service for your application which does this. All the files/dbs/preferences can be written to a folder.

But, this approach also has a risk if the user formats his SD card or deliberately deletes the folder. You can have no control over that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM