2

我正在使用 AppFolder,并成功地将文件读/写到该文件夹​​。我可以在一台设备上将文件写入该文件夹并在另一台设备上读取它(使用相同的 Google 帐户)。

然而,每天早上我醒来发现 AppFolder 上的 listChildren 返回一个空的 MetadataBuffer。当我查看 Google Drive 网站的管理应用程序部分时,我的应用程序的 AppFolder 中显然有一些东西 (40KB)。

这可能是什么原因?

编辑:添加了一些代码

public void onConnected(Bundle bundle) {
  DriveFolder folder = Drive.DriveApi.getAppFolder(mGoogleApiClient);
  folder.listChildren(mGoogleApiClient).setResultCallback(mChildrenRetrievedCallback);

...

mChildrenRetrievedCallback = new ResultCallback<MetadataBufferResult>() {
  public void onResult(MetadataBufferResult result) {
    if (!result.getStatus().isSuccess()) {
      // oh noes!
      return;
    }
    MetadataBuffer buffer = result.getMetadataBuffer();
    // buffer.getCount() is 0
4

0 回答 0