google-drive-android-api

How to create the file inside a folder in google drive?

北城余情 提交于 2019-12-12 05:29:16
问题 I am facing the issue in creating the file inside a folder , i created the separate file and separate folder in google drive but i can't create the file inside a folder in google drive I have used the for creating the file inside the folder in google drive is posted below public void onClickFolderInRootFlder(View view) { MetadataChangeSet changeSet = new MetadataChangeSet.Builder().setTitle("New CallLog folders").build(); Drive.DriveApi.getRootFolder(mGoogleApiClient).createFolder(

How to upload multi files to different folders on google drive at the same time

蹲街弑〆低调 提交于 2019-12-12 05:25:19
问题 firstly, it's my first time i post a question on SO so you can feel free to give me advices if i make something wrong. My question is post's title, i am success to upload multi file to google drive but i can not upload them into different sub folders on drive. Thanks in advance Here is my code: Upload class to handle upload function: public class UploadFileActivity /*implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener*/ { private static final String TAG

How to copy google drive folder into another google drive account by using App Script?

限于喜欢 提交于 2019-12-12 03:42:04
问题 I want to copy google drive folder to another google Drive by using App Script. Right now I am sharing folder to target account and try to copy folder to target google drive.Here is my App Script Code: // Make copy in Google Drive function CopyTamplate(companyName) { var folder = DriveApp.getFolderById("<<folder_id>>"); var folderid = folder.getId(); folder.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.VIEW); Drive.Permissions.insert( { 'role': 'reader', 'type': 'user', 'value':

How to Get OAuth Token From GoogleApiClient

狂风中的少年 提交于 2019-12-12 03:35:51
问题 I am trying to build an Android application that created a spreadsheet in Google Drive and then adds some data to it. I can successfuly create the spreadsheet using the Google Drive Android API which involves creating a GoogleApiClient and using a class that implements GoogleApiClient.ConnectionCallbacks . When I start the application I make a new GoogleApiClient and am prompted to select an account. In the onConnected callback I can new pass my GoogleApiClient to Drive.DriveApi to query and

Android app, Desktop c# app sharing Google Drive App Data

拜拜、爱过 提交于 2019-12-12 03:28:07
问题 I am trying to sync data between my C# desktop application and an Android application. I got the desktop app running as intended with no problems. However I want to access the data uploaded by the desktop app with the android app and that is where I run into issues. This is how I connect to drive in my android app. myGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(Drive.API) .addScope(Drive.SCOPE_APPFOLDER) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build(

Upload file to Googledrive programmatically using Android API

£可爱£侵袭症+ 提交于 2019-12-12 03:18:12
问题 Once I logged in gdrive I tried to upload csv file programmatically. But it throws error in service. public class Gdriveactivity extends Activity implements ConnectionCallbacks, OnConnectionFailedListener { private static final String TAG = "android-drive-quickstart"; private static final int REQUEST_CODE_CAPTURE_IMAGE = 1; private static final int REQUEST_CODE_CREATOR = 2; private static final int REQUEST_CODE_RESOLUTION = 3; private GoogleApiClient mGoogleApiClient; private Bitmap

What could be the cause for remote data corruption when using the google drive android API?

故事扮演 提交于 2019-12-11 20:25:24
问题 I have createa a small app that reads and writes files using the Google Drive Android API. Locally on one client, everything works fine: I store files using the Drive API, and read them back on the next start without any issues ever. However, when I read the same files on a different device with the same App, the files are corrupted sometimes. The files are JSON files, and the parser complains about missing quotes or braces. If I look at the files using the Google Drive Web interface, I can

com.google.android.gms.drive.DriveApi.ContentsResult cannot be resolved… But everything else can be?

℡╲_俬逩灬. 提交于 2019-12-11 20:14:56
问题 I'm getting this error: com.google.android.gms.drive.DriveApi.ContentsResult cannot be resolved But just with that one import. These all work: import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesUtil; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.common.api.ResultCallback; import com.google.android.gms.common.api.Status; import com.google.android.gms.drive.Contents; import com.google.android

DriveFile.trash(GoogleApiClient) method is gone

醉酒当歌 提交于 2019-12-11 19:18:06
问题 Android sample code has trash() method (see same code github) DriveFile file = Drive.DriveApi.getFile(getGoogleApiClient(), result.getDriveId()); file.trash(getGoogleApiClient()).setResultCallback(trashCallback); I use the latest google play service library (updated on March 17). But DriveFile class does not contain trash() method. How to trash file? Must use Google-Drive-SDK for java? 回答1: It looks like it was an OOPS. The code on Github disappeared with a commit msg "remove trashing

How can I delete Google drive file on android app

旧街凉风 提交于 2019-12-11 16:06:52
问题 I am a developer and currently working on google drive API on android. I can query and create file/folder from my app using GoogleApiClient; however, I cannot delete the files from my app. After I google it and I found out that the newest google drive Android API has not supported it yet. So, are there other ways to delete files from android app? 回答1: The answer is here - SO 22295903, just combine with the old API. Or wait, DELETE has been promised soon. In SO 22295903, there is a mention of