Google drive api 无法在由google drive Web Api创建的android应用程序中列出google drive中的文件

Google drive api 无法在由google drive Web Api创建的android应用程序中列出google drive中的文件,google-drive-api,google-drive-android-api,google-drive-shared-drive,Google Drive Api,Google Drive Android Api,Google Drive Shared Drive,我有一些文件在谷歌驱动器文件夹创建使用谷歌网络API 现在我想列出文件,然后读取内容 我无法使用Android Google Drive API列出文件 其中,由于Web API创建的另一个文件未列出。即使Android Drive API使用需要Drive.file范围,您仍应在问题中包含该信息。此范围可能意味着您尚未使用应用程序打开该文件,因此无法将其与查询匹配-如您链接的页面上所述。可能重复感谢回复,Hi-Techhowch,感谢回复。我已经给出了文件和文件夹的作用域。reqScp.add

我有一些文件在谷歌驱动器文件夹创建使用谷歌网络API

现在我想列出文件,然后读取内容

我无法使用Android Google Drive API列出文件


其中,由于Web API创建的另一个文件未列出。

即使Android Drive API使用需要
Drive.file
范围,您仍应在问题中包含该信息。此范围可能意味着您尚未使用应用程序打开该文件,因此无法将其与查询匹配-如您链接的页面上所述。可能重复感谢回复,Hi-Techhowch,感谢回复。我已经给出了文件和文件夹的作用域。reqScp.add(驱动器范围文件);请求添加(驱动器范围\应用文件夹);是这样的。1) 从Google Drive Web API创建随机数量的文件。它们每小时动态创建一次。2) 现在我们需要在Android应用程序中读取这些数据。我不确定,1]为什么不列出来自Android驱动API的相同用户和其他文件的限制。2] 有没有在使用android studio的android程序中使用RESTAPI的例子,这样我就可以获得我的应用程序中列出的文件。谢谢Arun Ayachith
    Task<MetadataBuffer> queryTask = getDriveResourceClient().queryChildren(folder, query);
    // END query_children]
    queryTask
            .addOnSuccessListener(this,
                    metadataBuffer -> mResultsAdapter.append(metadataBuffer))
            .addOnFailureListener(this, e -> {
                Log.e(TAG, "Error retrieving files", e);
                showMessage(getString(R.string.query_failed));
                finish();
            });
    }
}
-----------------------------
07-29 20:57:50.587 9722-9722/com.shasratech.s_c_31 I/DT-Google-drive: In case GOOGLE_DRIVE_GET_FILE calling findChild
07-29 20:57:50.692 9722-10478/com.shasratech.s_c_31 I/DT-Google-drive:  File Title = DT-DBB-29-07-2018 20:57:19.sqlite
07-29 20:57:50.693 9722-10478/com.shasratech.s_c_31 I/DT-Google-drive:  File Title = DT-DBB-29-07-2018 20:26:46.sqlite
--------------------------------