In one of my project, I required getting implement the file-manager
structure which includes files and documents from Google Drive. I have tried almost all the solutions available on Stack Overflow. But none of them works for me.
So Can anyone give me working example of "How to get file path or download file from Google Drive using google drive API"?
Asked
Active
Viewed 530 times
0

Er. Vihar
- 1,495
- 1
- 15
- 29
-
" I have tried almost all the solutions available on Stack Overflow" -- then link to them from your question and explain **in detail** what did not work for you. – CommonsWare Sep 29 '17 at 11:21
-
There is no real path for the files in Drive since a [single file can have a multiple parentID](https://stackoverflow.com/questions/41546503/how-to-get-absolute-path-of-a-document-and-file-from-google-drive-using-java-dri#comment70301074_41546503) and it is also stated in this [forum](https://productforums.google.com/forum/#!msg/drive/h6OkYSrWZp0/cyjdTMZ7x8gJ). You have to create a custom function that calls multiple **`file.getParents()`** to achieve this requirement. – Mr.Rebot Sep 30 '17 at 19:52
-
You can use Drive Android API, this will automatically handles download for you. You can check this related [SO post](https://stackoverflow.com/a/38010016/5995040) for implementation purposes. It also contains Google guide and sample in case you need additional information. Hope this helps. – Mr.Rebot Sep 30 '17 at 19:52