删除机器人/垃圾文件使用android.gms.drive机器人、垃圾文件、android、gms

2023-09-07 17:54:59 作者:别来无恙

我需要使用 com.google.android.gms.drive 从谷歌驱动器删除文件。从我读过here和网络上出现了新的API的文件删除不支持。 是(仍然)是否正确?我的意思是这个API是不是新的了...

I need to delete files from Google Drive using com.google.android.gms.drive. From what I've read here and across the web there is no support for file deletion in the "new API". Is that (still) correct? I mean the API isn't that new anymore ...

我也读到了明确的内容和忘记-strategy,但我想不会效仿这种做法。

I also read about the "clear contents and forget"-strategy, but I'd like not to follow that approach.

问题的第2部分:的考虑,它仍然无法通过上述API来删除文件;没有任何的轻松的方式向 REST API 结合W¯¯ /在code我已经写?类似于

Part 2 of the question: Given it's still impossible to delete files via the API mentioned above; is there any easy way to combine the REST API w/ the code I've already written? Something like

得到GoogleApiClient令牌 在火灾DELETE请求瓦特/令牌和文件ID ??? 利润

编辑:新的谷歌游戏服务(版本7.0.0 2015年/ 3月)终于拥有垃圾桶()方法。见的https://developer.android.com/reference/com/google/android/gms/drive/DriveResource.html对于进一步的细节。

edit: The new Google Play Services (version 7.0.0 / March 2015) finally features a trash() method. See https://developer.android.com/reference/com/google/android/gms/drive/DriveResource.html for further details. .

EDIT2:显然,你无法从应用文件夹,使用垃圾桶()上的文件:无法垃圾应用程序文件夹或文件的应用程序文件夹内:((

edit2: Apparently you cannot use trash() on files from the app folder: Cannot trash App Folder or files inside the App Folder. :((

EDIT3:截至5月28日,它现在可以真正删除文件。

edit3: As of May 28th, it's now possible to actually delete files.

推荐答案

删除是支持的谷歌推动Android API作为谷歌的使用Play业务7.5 DriveResource.delete()方法。

Delete is supported by the Google Drive Android API as of Google Play services 7.5 using the DriveResource.delete() method.

删除是永久性的,并建议只对应用程序文件夹的内容,这里的垃圾是不可用的。

Delete is permanent, and recommended only for App Folder content, where trash is not available.