I'm trying to implement Google Drive functionality in our application and in stuck with such problem: using this code
try {
// File's binary content
java.io.File fileContent = new java.io.File(Environment.getExternalStorageDirectory() + "/miniclipId.txt");
FileContent mediaContent = new FileContent("text/plain", fileContent);
// File's metadata.
File body = new File();
body.setTitle(fileContent.getName());
body.setMimeType("text/plain");
FileList file = service.files().list().execute();
if (file != null) {
//showToast("Photo uploaded: " + file.getTitle());
//startCameraIntent();
}
} catch (UserRecoverableAuthIOException e) {
startActivityForResult(e.getIntent(), REQUEST_AUTHORIZATION);
} catch (IOException e) {
showToast(e.getMessage());
}
i'm trying to send simple text file to Google drive and, such a bad luck, i get this exeption:
{
"code": 403,
"errors": [
{
"domain": "usageLimits",
"message": "Access Not Configured",
"reason": "accessNotConfigured"
}
],
"message": "Access Not Configured"
}
I enabled Drive API in google API Console, entered SHA1 debug fingerprint and app's package name is exactly the same as entered in API Console. Any ideas please?