0

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?

pinoyyid
  • 21,499
  • 14
  • 64
  • 115
s011208
  • 305
  • 4
  • 12

1 Answers1

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 reverting to the RESTful API. I have not done it myself, but I think you would take the resource ID, DriveId.getResourceId() and apply it to the trash or delete method. But it is only an untested idea, so don't shoot me.

Community
  • 1
  • 1
seanpj
  • 6,735
  • 2
  • 33
  • 54
  • There is still no 'delete' AFAK. But I am not current in GDAA since I switched to the RESTful a while ago. You can work around it by creating your own 'mytrash' folder, empty the file content, optionally rename the file (i.e. prefix + orig filename), and move it to the 'mytrash'. But all your logic must adjust (like search results filtered by parentfolder != 'mytrash' or checking the prefix, etc.) Quite messy. If you mix REST trash and GDAA, you'll run into timing issues (you have no control over GDAA changes propagation) – seanpj Mar 13 '15 at 15:32