Closed shyamkumarm closed 5 years ago
mDriveService.files().list().setSpaces("drive").execute() // return all folders and files.
mDriveService.files().list().setSpaces("drive").execute()
How to get the folder's and files from the specific folder using "folder ID"?
Also tried : protected Task<FileList> queryFiles() { String parentId = "1Mv62bjNcq1pef_cJ3XXeXFbunaX3UI7V"; String fileQuery = "'" + parentId + "' in parents and trashed=false"; return Tasks.call(mExecutor, () -> mDriveService.files().list().setQ(fileQuery).execute()); }
protected Task<FileList> queryFiles() { String parentId = "1Mv62bjNcq1pef_cJ3XXeXFbunaX3UI7V"; String fileQuery = "'" + parentId + "' in parents and trashed=false"; return Tasks.call(mExecutor, () -> mDriveService.files().list().setQ(fileQuery).execute()); }
I am able to get it now, Changed the Scope "DriveScopes.DRIVE" instead of "DriveScopes.DRIVE_FILE" in the project. it works
mDriveService.files().list().setSpaces("drive").execute()
// return all folders and files.How to get the folder's and files from the specific folder using "folder ID"?
Also tried :
protected Task<FileList> queryFiles() { String parentId = "1Mv62bjNcq1pef_cJ3XXeXFbunaX3UI7V"; String fileQuery = "'" + parentId + "' in parents and trashed=false"; return Tasks.call(mExecutor, () -> mDriveService.files().list().setQ(fileQuery).execute()); }