문제

I am using the BackupManager to backup SharedPreferences to the cloud. Now this works as expected when I use it on a single device and only perform a reinstall not a full uninstall. To do that I am clearing data which wipes prefs and than reinstalling the app from eclipse. If I first uninstall the app and after reinstall it the restore call reports no data to restore. The same happens when I install the app on another device.

From my understanding I would expect the data to be restored to any device regardless of the app being reinstalled or being a fresh install. Let me know if posting code will help but I figured that because it is working I might just have misunderstood what the service should be used for and how it works. I am trying to backup a users settings and possibly some information they enter into search fields. I would like this data to follow the user to a new device or if the user uninstalls the app and reinstalls at a later date. Please let me know if BackupManager is not the correct tool to accomplish this.

도움이 되었습니까?

해결책

As I know from the words of Android Advocate:

Generally it seems that BackupManager is only reliable for backing up app data that will later be restored on the same device if the app is re-installed from the Play Store.

If you want to do backup syncing across multiple devices then you can try to use Google Drive API, not BackupManager, and that there is very useful session from Google I/O 2012 on the subject.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top