如何从android中的谷歌驱动器获取所有文件夹和文件的列表 [英] How to get list of all folders and files from google drive in android
问题描述
我已经开始开发一个应用程序,我必须从谷歌驱动器列出所有文件夹和文件。
我已经浏览了所有文档和下面的演示链接正如此堆栈溢出提示答案,
https://github.com/googledrive/android-demos
和
https://github.com/seanpjanson/RESTDemo
我已经使这两个演示程序都正常工作。 但我无法列出所有的Google云端硬盘文件夹和文件。目前我只能列出仅由应用创建的文件。如果有任何其他文件夹从网络创建,那么它不会显示在日志或列表中。
任何人都可以帮助我解决这个问题。任何链接,建议,指导都将有所帮助。
我怀疑这可能是不允许的 但有一个示例应用程序是 BubbleUPnP ,他们已经列出了这些文件夹和文件。我怎么能在我的应用程序中实现这一点?
任何帮助将不胜感激。
https://developers.google.com/drive/v3/web/about-auth#AboutAuthorization
要完全访问所有文件,请选择以下范围: https://www.googleapis.com/认证/驱动器
I have started developing a app in which i have to list of all folders and files from google drive.
I have go through all the documentation and below demo links as suggested in this stack overflow answer,
https://github.com/googledrive/android-demos
And
https://github.com/seanpjanson/RESTDemo
I have make these both demo working properly. But I am not able to list out all the folders and files of google drive. Currently i can only list out those files which are created by app only. If there is any other folder created from web then it is not showing in the log or list.
Can any one help me on this. Any link, suggestion , guidance will be helpful.
I am having a doubt that may be this is not allowed but there is a sample app which is BubbleUPnP in this app they have listed the folders and files. How can i achieve this in my app ?
Any help will be appreciated.
You need to request the correct Scope.
https://developers.google.com/drive/v3/web/about-auth#AboutAuthorization
To have full access to all files\folders requires the scope: https://www.googleapis.com/auth/drive
这篇关于如何从android中的谷歌驱动器获取所有文件夹和文件的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!