Reputation: 5198
I read tons about the Google Drive API, Google Sheets API, and others, but with all the versions changing all the time I didn't understand what I should use...
I have a android app, and all I want to do it to write text to a existing Google Drive spreadsheet.
Example: Just have a edittext where I can put text and put it in a specific cell in the spreadsheet.
The spreadsheet is in a folder that is shared with some people, and I want the user to enter a mail address and than (after I make sure that the folder is shared with him) can write to the spreadsheets in the folder.
Also retrieving text from the spreadsheets is needed.
Does anybody have any experience doing this in android??
thanks!
Upvotes: 4
Views: 10991
Reputation: 19835
Based on the comments we exchanged:
you looked at: Android - Google Spreadsheet Api which mentions 3 items:
Google Drive Api : https://developers.google.com/drive/
is for creating a spreadsheet. you might not need that if you are using an existing spreadsheet.
Google Spreadsheet Api: https://developers.google.com/google-apps/spreadsheets/
reads/writes to the spreadsheet
Google APi java client: http://code.google.com/p/google-api-java-client/
Wraps the api in a library for easy usage. Otherwise use the raw https calls directly.
For authentication you will need oauth2. Look at the samples for doing a google+ button login in android.
https://developers.google.com/+/mobile/android/sign-in
Once you have that going with the correct scopes (spreadsheets and maybe drive), that library will give you the "access token" you need to call the spreadsheets client library.
Upvotes: 5