简体   繁体   中英

Will the Google Drive appfolder be deleted after a user uninstalls my app?

Here it sais: "Your App Folder is deleted if users uninstall your app from their Drive. They can also delete your app's App Folder manually using the Options menu in the Manage Apps dialog." but after I tried out to uninstall and reinstall the app and sync with Drive.getDriveClient(...).requestSync(); I can access to the items I uploaded before. How is that possible?

After uninstalling apps, can you see that storage is still consumed in the app data folder through the web interface?

Here is the solution you may trying:

using Drive.DriveApi.requestSync() method in onConnected() method.

@Override
    public void onConnected(Bundle connectionHint) {
Drive.DriveApi.requestSync(mGoogleApiClient).setResultCallback(syncCallBack);

    }
Drive.DriveApi.requestSync(mGoogleApiClient).setResultCallback(syncCallBack);
private ResultCallback<Status> syncCallBack = new ResultCallback<Status>() {
        @Override
        public void onResult(@NonNull Status status) {
            if (!status.isSuccess()) {
                if (DriveStatusCodes.DRIVE_RATE_LIMIT_EXCEEDED == status.getStatusCode()) {
                    //intimate user to wait for some time if you want to
                }
            }
                //now query db file from google drive's app folder
}
};

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