Download Google Sheets spreadsheets from Google Drive on Android

I am working on an Android application that uses the gdata-java client to download documents for display only. So far I have an application that authenticates with services and displays a list of user documents. When the user selects a document, another request is made for the documents themselves. Querying txt, html, rtf and doc files works well, however, when I request a spreadsheet in .csv or .xsl format, the result is unexpected.

I am using an HTTPResponse object to store an HTTPRequest result. When I request a document in .csv or .xsl format, the HTTPResponse.parseAsString () method creates the entire html page, which appears to be the main page of Google Docs. Sounds weird, but the result is the actual html for the login page. HTTPResponse.getStatusMessage returns 200.

It seems like I'm missing something here. Is there another HTTPResponse property that contains .csv data?

I am sure that I am using the correct uri to download spreadsheets because it works when downloading through my browser. In any case, here is an example uri:

https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=0AsE_6_YIr797dHBTUWlHMUFXeTV4ZzJlUGxWRnJXanc&exportFormat=csv

Thanks in advance for any help :)

+5
3

2017 , -. API- GData, GData, API- , ClientLogin URL- , . API- Drive API, API- Google Android: Google API Android. , API Google API Java, .

- , API Google , . ... Android, Java API . JavaDocs API . API- , , - , ( , , /, , ..)

- , , OP, API Google . API Google Android, . , Android API, , . API- API- Android.

0

All Articles