google-drive-android-api

“Cannot find DriveId. Are you authorized to view this file?”: Even if EXISTING_FOLDER_ID is set manually

依然范特西╮ 提交于 2019-12-30 11:16:09
问题 I am having a look at here from github. I can create a file and a folder successfully by reading the code provided in github. But I am not being able to edit the file or create a file/folder in any specific folder. The main problem would be using emulator, but I am not sure. I am using GenyMotion I have also copied the ID of a file/folder using showMessage("Created a file in App Folder: " + result.getDriveFile().getDriveId()); and showMessage("Created a folder: " + result.getDriveFolder()

Google Drive Android API (GDAA) getResourceId() returning null (timing issue)

大憨熊 提交于 2019-12-30 09:36:22
问题 When testing of delete, trash functionality discussed in SO 22295903, I've run into this issue. 1/ Create a file with contents GoogleApiClient _gac; DriveFile createFileWait(DriveFolder fldr, String name, String mime, byte[] buff) { DriveFile drvFile = null; try { ContentsResult rslt = Drive.DriveApi.newContents(_gac).await(); if (rslt.getStatus().isSuccess()) { Contents cont = rslt.getContents(); cont.getOutputStream().write(buff); MetadataChangeSet meta = (mime == null) ? new

How to get Google Drive file ID

旧城冷巷雨未停 提交于 2019-12-28 06:52:06
问题 I've created a file to Drive root using Google Drive Android API. How can I get this file ID to share it using Google Client Library? Getting DriveFileResult in ResultCallback<DriveFileResult> callback returns Null: String fileId = result.getDriveFile().getDriveId().getResourceId(); 回答1: The callback is to the file being created locally. The DriveId will only have a resourceId when the file is synced to the server. Until then getResourceId will return null. https://developer.android.com

How to use google drive api in my android application?

坚强是说给别人听的谎言 提交于 2019-12-27 00:55:08
问题 I want to upload my application data to google drive.So I have to integrate Google Drive into my application, but I can't find any proper solution or source code for do that thing. So please if any one have full code of how to use Google Drive into android application than please help me. 回答1: First, a bit of critique. If you ask a question this way ('show me the magic trick'), it will get promptly down-voted, purged. It only shows you did not do your homework. The other possibility is that

Upload multiple files to Google Drive

时光怂恿深爱的人放手 提交于 2019-12-25 12:00:53
问题 Up until now I've been using the upload a file to drive demo code. However, for my application I need to be able to upload multiple user selected files with one click of a button. My problem is that instead of upload each file to Drive it will upload the last file selected once for every file thats been selected. I think if I understand it correctly the cause of this has something to do the IntentSender being executed multiple times quickly and returning to the REQUEST_CODE_CREATOR case but I

Does the Google Drive Android API work for all Google accounts?

前提是你 提交于 2019-12-25 08:20:27
问题 I’m trying to save some user preferences across multiple devices on my Android application. Do I need to request the user other authentication credentials or additional steps to enable the Google Drive Android API beside the Google account they already have? Is Google Drive available for all Google accounts? 来源: https://stackoverflow.com/questions/42317503/does-the-google-drive-android-api-work-for-all-google-accounts

Cannot access Google Drive from 2 different device

放肆的年华 提交于 2019-12-25 08:11:24
问题 I have an app which creates a word file on the Google Drive with some text. If I try to access the word file on the Google Drive from the device In which I have created that file, then it works and everything thing goes smooth, and I can able to read and write. But If I try to access the same file with the same DriveId on the different device with the same app, then I can't access it. I have seen 2 related questions on the StackOverflow but I can't figure out the problem. Any help would be

How to connect to Google Drive using the Android API and a specific account?

送分小仙女□ 提交于 2019-12-25 07:17:25
问题 I want to use Google Drive for cloud sync purposes. Is it possbile using Google Drive API for Android to connect to a specific account that will act as a cloud storage server ? How can I set the user account and password when I try to connect with that specified Google account ? So far I'm using: mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(Drive.API) .addScope(Drive.SCOPE_FILE) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build(); But this provides the

I am unable to download contents of a file using google drive

若如初见. 提交于 2019-12-25 04:46:22
问题 I am attempting to download a google doc file with google drive but I keep getting the status message: Status{statusCode=No content is available for this file., resolution=null}. This problem persists for any file I attempt to download. The files that I am downloading are not empty and have text in them. This is the class that handles google drive. package com.parse.starter; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import android.content

How to convert RFC 3339 date-time to IST?

余生长醉 提交于 2019-12-25 03:16:16
问题 I was working with Google drive rest APIs to list my Google drive files. I was fetching below metadata of the file in my drive. In that, I am getting the "Created Time" in RFC 3339 format. Can you help me to convert the time returned by the Google drive rest APIs to IST? Is there any way to do this in Linux platform? { "files": [ { "id": "1y_GB6OCBENf_gDMAzAHdN", "name": "testfile.jpg", "webViewLink": "https://drive.google.com/file/d/1y_GB6OCBENf_gDMAzAHdN/view?usp=drivesdk", "createdTime":