My app is set up so that backups are saved in the appdata folder of Google Drive. All this works great on one device. When I make a backup, delete the application data, and then restore it all.
However, when I try to make a backup on one device and then install it on another and try to restore, no files were found. The same thing happens when I uninstall the application on the source device, reinstall it on the same device and try to recover. Both cases lead to the fact that no files were found, despite the fact that I see that there are files in the appdata folder when I enter Google Drive.
I read somewhere that you should use the RESOURCE_ID instead of the DRIVE_ID of the file in order for it to work between devices, since the DRIVE_ID will differ from device to device. However, the only way I saw how to get RESOURCE_ID is using driveId.getResourceId (), and I cannot get the correct DRIVE_ID from another device.
tl; dr: how can I find the correct file from the appdata folder created by another device / installation?
source share