在新的 Google Drive Android API 中删除、删除? [英] Trash, Delete in new Google Drive Android API?

查看:14
本文介绍了在新的 Google Drive Android API 中删除、删除?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新(2015 年 5 月):
垃圾"功能已在 GDAA 中实现,因此下面的问题无关紧要.

UPDATE (May 2015):
the 'trash' functionality has been implemented in GDAA, making the question below irrelevant.

原始问题:
当我使用新的Google Drive Android API"(GDAA)时,我遇到了一些我无法弄清楚的差异.基本上,我有一个使用com.google.api.services.drive"接口(插入、补丁、更新)的旧应用程序,我很想将它移植到 GDAA.

ORIGINAL QUESTION:
As I play with the new "Google Drive Android API" (GDAA), I am running into a few discrepancies I can't figure out. Basically, I have an old app that uses the "com.google.api.services.drive" interface (insert, patch, update) and I WOULD LOVE to port it to GDAA.

首先,GDAA 与 drive.google.com 网络应用程序.
对于旧服务,我使用了 DriveScopes.DRIVE_FILE 范围,因此我假设了类似的行为/结果.我(云端硬盘所有者)可以在https://drive.google 中删除使用旧的DriveScopes.DRIVE_FILE"创建的文件.com"(我假设我的范围是 DRIVE 那里),随后的 Android 应用程序查询将找不到它们.它的行为与我预期的一样:

First, GDAA vs. drive.google.com web app.
With the old service, I used the DriveScopes.DRIVE_FILE scope, so I assumed similar behavior/results. Files created with the old "DriveScopes.DRIVE_FILE" can be deleted by me (the Drive owner) in "https://drive.google.com" (I assume that my scope is DRIVE there) and subsequent Android app queries will not find them. It behaves as I would expect:

  1. Android 应用会创建文件.
  2. 用户在drive.google.com"上删除它们.
  3. Android 应用不再看到它们.

使用新的 GDAA,它似乎不起作用.这让我想到了第二点:

With the new GDAA, it does not seem to work. Which brings me to the second point:

DELETE/TRASH 功能.
我试图测试 CRUD 功能,但根本找不到 DELETE(同样,这可能是我的无知/短视).从drive.google.com"中删除它们会使它们在那里不可见,但 Android 应用程序仍然可以看到它们.元数据可以通过isTrashed()"进行查询,但MetadataChangeSet.Builder"中没有任何内容可以让我删除/删除它们,只有 setMimeType()、setStarred()、setTitle().

DELETE/TRASH functionality.
I was trying to test CRUD functionality and couldn't find DELETE at all (again, it may be my ignorance/shortsightedness). Deleting them from "drive.google.com" makes them invisible there, but the Android app still sees them. Metadata can inquire through "isTrashed()", but there is nothing in "MetadataChangeSet.Builder" that would let me delete/trash them, only setMimeType(), setStarred(), setTitle().

我迷路了,请帮忙.

推荐答案

Google Drive Android API 不会立即与远程资源同步.根据调度程序,同步可能需要一段时间.调度取决于 Android 的帐户同步组件,这些组件确保网络带宽和电池寿命得到保存和有效利用.

Google Drive Android API doesn't sync with the remote resources instantly. Depending on the scheduler, it may take a while to sync. The scheduling is dependant to Android's account sync components those are making sure that network bandwidth and battery life is conserved and efficiently used.

此外,从开发者预览版开始,我们不支持删除或丢弃.但是,下一个版本可能会支持这些操作.

Additionally, as of Developer Preview, we don't support deletion or trashing. But, the next release will likely to support these actions.

这篇关于在新的 Google Drive Android API 中删除、删除?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆