GDrive REST API - Read files not created by application - Connection issues
I want to be able to
- select a folder in Google Drive (alternatively, I can just Copy/Paste the Drive ID because this application is only for my needs for the moment)
- Read files metadata in this folder
- Download content of those files (spreadsheet)
I tried to use Google Drive API which is pretty simple, but this restriction is a problem for me:
Note: The Android Drive API only works with the
https://www.googleapis.com/auth/drive.file scope. This means that only
files which a user has opened or created with your application can be
matched by a query.
Indeed, the Drive folder and files (spreadsheet) I want to read or download are not created by the application.
https://www.googleapis.com/auth/drive.readonly would be perfect for my needs, but it’s only usable with Google Drive REST API.
This is where my problems begins:
First, I tried to run the REST DEMO Master project. With some updates in the gradle it works fine.
So, I tried to create a new project (API 23, no activity) and I simply copy/paste files from REST DEMO Master project. I ran this new project and it threw this exception:
UNSPECIFIED GOOGLE DRIVE FAILURE - the name must not be empty: null
As the code is the same, I suppose that the problem comes from conflicts between API Version or project configuration (I’m pretty new to android development and not comfortable with Gradle), and I can't use this code in my existing project.
I read this thread (and many others), I spent hours trying different solutions but I’m really stuck and I can’t find a way to make that work.
What is the best way to connect to a GDrive folder and read content of files not created by the application? Any help would be really appreciated!
NB: I generated the signing certificate fingerprint (SHA1) and registered the application.
android google-drive-sdk
add a comment |
I want to be able to
- select a folder in Google Drive (alternatively, I can just Copy/Paste the Drive ID because this application is only for my needs for the moment)
- Read files metadata in this folder
- Download content of those files (spreadsheet)
I tried to use Google Drive API which is pretty simple, but this restriction is a problem for me:
Note: The Android Drive API only works with the
https://www.googleapis.com/auth/drive.file scope. This means that only
files which a user has opened or created with your application can be
matched by a query.
Indeed, the Drive folder and files (spreadsheet) I want to read or download are not created by the application.
https://www.googleapis.com/auth/drive.readonly would be perfect for my needs, but it’s only usable with Google Drive REST API.
This is where my problems begins:
First, I tried to run the REST DEMO Master project. With some updates in the gradle it works fine.
So, I tried to create a new project (API 23, no activity) and I simply copy/paste files from REST DEMO Master project. I ran this new project and it threw this exception:
UNSPECIFIED GOOGLE DRIVE FAILURE - the name must not be empty: null
As the code is the same, I suppose that the problem comes from conflicts between API Version or project configuration (I’m pretty new to android development and not comfortable with Gradle), and I can't use this code in my existing project.
I read this thread (and many others), I spent hours trying different solutions but I’m really stuck and I can’t find a way to make that work.
What is the best way to connect to a GDrive folder and read content of files not created by the application? Any help would be really appreciated!
NB: I generated the signing certificate fingerprint (SHA1) and registered the application.
android google-drive-sdk
I found a documentation regarding Authorizing and Using REST APIs, you can start with this.You can find the complete REST API sample code included in the Google Sign-In Quickstart on Github: RestApiActivity.java.
– Mr.Rebot
Nov 16 '18 at 7:24
Thank you for the Google Sign-In Quickstart sample code, it really helped ! Problem solved :)
– flzox
Nov 20 '18 at 19:54
add a comment |
I want to be able to
- select a folder in Google Drive (alternatively, I can just Copy/Paste the Drive ID because this application is only for my needs for the moment)
- Read files metadata in this folder
- Download content of those files (spreadsheet)
I tried to use Google Drive API which is pretty simple, but this restriction is a problem for me:
Note: The Android Drive API only works with the
https://www.googleapis.com/auth/drive.file scope. This means that only
files which a user has opened or created with your application can be
matched by a query.
Indeed, the Drive folder and files (spreadsheet) I want to read or download are not created by the application.
https://www.googleapis.com/auth/drive.readonly would be perfect for my needs, but it’s only usable with Google Drive REST API.
This is where my problems begins:
First, I tried to run the REST DEMO Master project. With some updates in the gradle it works fine.
So, I tried to create a new project (API 23, no activity) and I simply copy/paste files from REST DEMO Master project. I ran this new project and it threw this exception:
UNSPECIFIED GOOGLE DRIVE FAILURE - the name must not be empty: null
As the code is the same, I suppose that the problem comes from conflicts between API Version or project configuration (I’m pretty new to android development and not comfortable with Gradle), and I can't use this code in my existing project.
I read this thread (and many others), I spent hours trying different solutions but I’m really stuck and I can’t find a way to make that work.
What is the best way to connect to a GDrive folder and read content of files not created by the application? Any help would be really appreciated!
NB: I generated the signing certificate fingerprint (SHA1) and registered the application.
android google-drive-sdk
I want to be able to
- select a folder in Google Drive (alternatively, I can just Copy/Paste the Drive ID because this application is only for my needs for the moment)
- Read files metadata in this folder
- Download content of those files (spreadsheet)
I tried to use Google Drive API which is pretty simple, but this restriction is a problem for me:
Note: The Android Drive API only works with the
https://www.googleapis.com/auth/drive.file scope. This means that only
files which a user has opened or created with your application can be
matched by a query.
Indeed, the Drive folder and files (spreadsheet) I want to read or download are not created by the application.
https://www.googleapis.com/auth/drive.readonly would be perfect for my needs, but it’s only usable with Google Drive REST API.
This is where my problems begins:
First, I tried to run the REST DEMO Master project. With some updates in the gradle it works fine.
So, I tried to create a new project (API 23, no activity) and I simply copy/paste files from REST DEMO Master project. I ran this new project and it threw this exception:
UNSPECIFIED GOOGLE DRIVE FAILURE - the name must not be empty: null
As the code is the same, I suppose that the problem comes from conflicts between API Version or project configuration (I’m pretty new to android development and not comfortable with Gradle), and I can't use this code in my existing project.
I read this thread (and many others), I spent hours trying different solutions but I’m really stuck and I can’t find a way to make that work.
What is the best way to connect to a GDrive folder and read content of files not created by the application? Any help would be really appreciated!
NB: I generated the signing certificate fingerprint (SHA1) and registered the application.
android google-drive-sdk
android google-drive-sdk
edited Nov 16 '18 at 2:21
Jacque
3827
3827
asked Nov 15 '18 at 14:31
flzoxflzox
1
1
I found a documentation regarding Authorizing and Using REST APIs, you can start with this.You can find the complete REST API sample code included in the Google Sign-In Quickstart on Github: RestApiActivity.java.
– Mr.Rebot
Nov 16 '18 at 7:24
Thank you for the Google Sign-In Quickstart sample code, it really helped ! Problem solved :)
– flzox
Nov 20 '18 at 19:54
add a comment |
I found a documentation regarding Authorizing and Using REST APIs, you can start with this.You can find the complete REST API sample code included in the Google Sign-In Quickstart on Github: RestApiActivity.java.
– Mr.Rebot
Nov 16 '18 at 7:24
Thank you for the Google Sign-In Quickstart sample code, it really helped ! Problem solved :)
– flzox
Nov 20 '18 at 19:54
I found a documentation regarding Authorizing and Using REST APIs, you can start with this.You can find the complete REST API sample code included in the Google Sign-In Quickstart on Github: RestApiActivity.java.
– Mr.Rebot
Nov 16 '18 at 7:24
I found a documentation regarding Authorizing and Using REST APIs, you can start with this.You can find the complete REST API sample code included in the Google Sign-In Quickstart on Github: RestApiActivity.java.
– Mr.Rebot
Nov 16 '18 at 7:24
Thank you for the Google Sign-In Quickstart sample code, it really helped ! Problem solved :)
– flzox
Nov 20 '18 at 19:54
Thank you for the Google Sign-In Quickstart sample code, it really helped ! Problem solved :)
– flzox
Nov 20 '18 at 19:54
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53321710%2fgdrive-rest-api-read-files-not-created-by-application-connection-issues%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53321710%2fgdrive-rest-api-read-files-not-created-by-application-connection-issues%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I found a documentation regarding Authorizing and Using REST APIs, you can start with this.You can find the complete REST API sample code included in the Google Sign-In Quickstart on Github: RestApiActivity.java.
– Mr.Rebot
Nov 16 '18 at 7:24
Thank you for the Google Sign-In Quickstart sample code, it really helped ! Problem solved :)
– flzox
Nov 20 '18 at 19:54