I’m using the new Google play service drive api to implement backup and restore data with App folder in my android application.I followed the intructions from the google drive developer guides.I can backup and restore data successfully when I only use one device and don’t uninstall and reinstall the app.But Problem appears when I use two devices or unintall and reinstall the app.
Scene 1: I install my app on one device and backup data to “App folder” succeed and I can see the data size of my app folder changed in Google drive “Manage apps”,then I install my app on another device and try to use “restore from google drive” to restore the data I just backup on the first device.but google drive api returned empty MetadataBuffer.
Scene 2: I install my app on one device and backup data to “App folder” succeed and I also see the data size of my app folder changed in “Manage apps”.then I uninstall my app and reinstall it and try to restore the data I backup.the same thing happened.There’s no file find in my app folder.
I tried api with both queryChildren and listChildren but no lucky.
Drive.DriveApi.getAppFolder(getGoogleApiClient()) .queryChildren(getGoogleApiClient(), query)
Can anyone from google drive team resolve the problem? I think it’s a really big bug.we still have no resolve method.
We have identified an issue with the API that meant App Folder content was not downloaded after an app was uninstalled then reinstalled. This will be fixed in the next release of Google Play services.
For development purposes, you can work around this issue in the current Google Play services (version 6.1) by clearing Google Play services data (Settings > Apps > Google Play services > Manage Space > Clear all data). We don’t recommend suggesting this solution to end users as this will likely clear data relied on by other apps.