通过应用访问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']

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...