Reputation: 784
Why are there so many different IDs for a file/folder in Google Drive? I just want to get the ID of the folder that I just created so another activity can list the files in it. Right now I'm adapting the sample code to do this:
final ResultCallback<DriveFolderResult> callback = new ResultCallback<DriveFolderResult>() {
@Override
public void onResult(DriveFolderResult result) {
EXISTING_FOLDER_ID = result.getDriveFolder().getDriveId();
}
}
But the EXISTING_FOLDER_ID I get is actually different from the ID I see attached to the Folder when I do a regular raw REST call in the Google APIs explorer. How do I get this ID using the Android SDK?
And there's also something called resource ID.
So which one do I use to identify a folder?
Upvotes: 0
Views: 605
Reputation: 46844
Within the Android API, you should always use the DriveId. The resourceId is the same as the ID use in the rest API, and is provided in the DriveId for compatibility. Use this one when going back and forth between the rest API and the Android API. Otherwise it shouldn't be necessary.
Upvotes: 2