通过应用访问Google电子表格,而无需使用其链接-Android StudioJava

问题描述

我正在开发一个移动应用程序,用户必须选择自己的Google帐户中已经存在的电子表格,以便该信息显示在该应用程序中。

我已经设法让用户登录该应用程序并授权从其帐户访问Google云端硬盘。

现在,我正在尝试寻找一种方法来查看和访问Google云端硬盘中的文件,在这种情况下,我感兴趣的是用户帐户中的电子表格,而无需使用电子表格链接。

所有范围均得到授权,我们也使用SHA1和OAuth。

Here the Image when someone open the App

Here the Image after the user log in into the app,and authorize the Google Drive Access,and go to Settings

Here is some example of a window that may be open to the user select which file he wants the app to read

我需要一些帮助来解决此问题,或者在不使用电子表格链接的情况下执行此操作。

解决方法

您可以使用Files:list。在python中应该是

files = service.files().list(q="'root' in parents and mimeType='application/vnd.google-apps.spreadsheet'").execute()['files']

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...