I'm working on a project where I need to upload a file to google Drive, to download it with another app.
I wanted to use the Drive Id, which I get by creating a file, to find it later, but this seems not to work.
I used an example from Google to get the ID:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case REQUEST_CODE_CREATOR:
if (resultCode == RESULT_OK) {
driveId = data.getParcelableExtra(
OpenFileActivityBuilder.EXTRA_RESPONSE_DRIVE_ID);
showMessage("File created with ID: " + driveId);
}
break;
default:
super.onActivityResult(requestCode, resultCode, data);
break;
}
}
This seemed to work so far, I am getting the Drive ID.
After this, I wanted to test it by using the Example "Files: get" from the Google Developers-page, where I got the following error:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "notFound",
"message": "File not found: CAESABiCASCQ1OnN-VMoAA==",
"locationType": "other",
"location": "file"
}
],
"code": 404,
"message": "File not found: CAESABiCASCQ1OnN-VMoAA=="
}
}
It seems like this ID is not the id to find files.
There must be something I missed but i don't know what.
I am new to programming, especially to Google and Android and I would be very happy if any one can help me through their answers.
Thanks.