我使用這個代碼:查詢失敗,谷歌雲端硬盤Android
GoogleApiClient client = new GoogleApiClient.Builder(this).addApi(Drive.API)
.addScope(Drive.SCOPE_FILE)
.addScope(Drive.SCOPE_APPFOLDER)
.build();
Query query = new Query.Builder().addFilter(Filters.and(Filters.and(Filters.and(Filters.eq
(SearchableField.TITLE, getString(R.string.app_name)), Filters
.eq(SearchableField.TRASHED, false)), Filters.eq(SearchableField.PARENTS, Collections
.singletonList(Drive.DriveApi
.getRootFolder(client)
.getDriveId()))), Filters.eq(SearchableField.MIME_TYPE, GoogleDriveClient.FOLDER_MIME))).build();
DriveApi.MetadataBufferResult result = Drive.DriveApi.query(client, query).await(TIMEOUT, TimeUnit.SECONDS);
if (!result.getStatus().isSuccess()) {
client.disconnect();
return;
}
總有一個錯誤:Status{statusCode=INTERNAL_ERROR, resolution=null}
我啓用了雲端硬盤API在谷歌控制檯,我再次檢查了我的SHA1指紋等操作正在起作用。它允許執行查詢嗎?