

I've read the Google API documents and they are a mess, and the classes don't have a proper documentation. Open the Google Drive app and tap on the Duplicate file. Here, right-click on the File and select the Delete forever option, as depicted. tText("Upload successful with file ID: " + resultFile.getId()) To remove duplicate files from Google Drive permanently, click on Trash in the left pane. load the content of the local file into the remote contentįileContent remoteFileContent = new FileContent("text/plain", fileLocal) įile resultFile = drive.files().insert(remoteFile, remoteFileContent).execute() Java.io.File fileLocal = new java.io.File(FILE_NAME) To upload a certain file I do the following: try

setJsonHttpRequestInitializer(new GoogleKeyInitializer(API_KEY))

JsonFactory jsonFactory = new JacksonFactory() ĭrive = Drive.builder(httpTransport, jsonFactory) When access is granted, the program will start scanning your Google Drive file’s metadata to identify duplicates. Additional Tips To Keep Google Drive Duplicates At Bay. Click on the trash button to get rid of the duplicates. Next, scan the entire drive to scan for duplicate copies. Then, log into your Google account, and give Easy Duplicate Finder access. Sign in to your Google account associated with your Google Drive. HttpTransport httpTransport = new NetHttpTransport() Once you’ve launched the app, select ‘Google Drive’ under ‘Scan Mode’. GoogleCredential credential = new GoogleCredential().setAccessToken(authToken)
Google drive duplicate finder android android#
Apparently, the call succeeds, but when I try to upload a file, it just hangs up until Android tells me that the App is not responding. I used the following code from an example in Google Drive scarce documentation, but it doesn't work.
Google drive duplicate finder android how to#
Now, I don't know how to use that token to initialize the Drive object to start sending requests to Google Drive. I was able to obtain an authorization token string for the user's Google account using AccountManager.getAuthToken(). I'm attempting to upload and download files from Google Drive in my android application. Android Open and Save files to/from Google Drive SDK
