Thiago Eidt
Thiago Eidt

Reputation: 1

Access a Google Spreadsheet from an App without using its link - Android Studio (Java)

I am developing a mobile application that the user must choose a spreadsheet that already exists in their google account, so that the information is shown in the app.

I've already managed to get the user to log into the application and authorise Google Drive access from his account.

Now I'm trying to find a way to be able to see and access the files that are in Google Drive, in which case what interests me is the spreadsheet that is in the user's account, without using the spreadsheet link.

All Scopes are authorized, we use SHA1 and OAuth as well.

Here the Image when someone open the App

Here the Image after the user log in into the app, and authorize the Google Drive Access, and go to Settings

Here is some example of a window that may be open to the user select which file he wants the app to read

I need some help to solve this problem, or another idea to do that without using the spreadsheet link.

Upvotes: 0

Views: 225

Answers (1)

Servus
Servus

Reputation: 517

You can use Files:list. In python it would be

files = service.files().list(q="'root' in parents and mimeType='application/vnd.google-apps.spreadsheet'").execute()['files']

Upvotes: 1

Related Questions