How to get list of all folders and files from google drive in android

て烟熏妆下的殇ゞ 提交于 2019-12-20 07:28:37

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/34136349/how-to-get-list-of-all-folders-and-files-from-google-drive-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!