Reputation: 685
In my android app, Im asking the user to select a file from his google drive. I can load the "file picker" correctly, but what I really need is the fileId for the file that the used selected.
I've looked into Drive, DriveId, Metadata etc.. but cant find out how to do it.
How do I find the fileId of a file that the user selected from Google Drive?
Upvotes: 1
Views: 1091
Reputation: 685
Figured it out!
DriveId is the id of the folder, to get fileId:
String fileId = DriveId.getResouceId();
NOTE! Google's code for Google Drive on github, (link below), tries to do this, but is actually wrong!! The fileId is your driveId.getResouceId();
Upvotes: 1