Hi everyone,

I'm trying to use Google Docs as a database for an android project. So
far, I've succeeded to login but when I try to get the available
spreadsheets, I just get an HttpResponseException "Not Found" ...
Anyone got any idea?

This is the code I'm using after being logged in (when logging in, I
get the Auth="..." which used here as variable auth):

String loginUrl = "http://spreadsheets.google.com/feeds/spreadsheets/
private/full";
String urlTospread = "http://spreadsheets.google.com/feeds/worksheets/
0AuMx7ordcDY6dFlxdEx2ZDBYYjhTMDdpR2RmdEE2OWc/private/full"; // replace
0AuMx7ordcDY6dFlxdEx2ZDBYYjhTMDdpR2RmdEE2OWc with your own combination
URI loginURI = null;
try {
        loginURI = new URI(urlTospread);
} catch (URISyntaxException e) {
        e.printStackTrace();
}
HttpClient httpclient = new DefaultHttpClient();
HttpGet httppost = new HttpGet(loginURI);
httppost.addHeader("Authorization", "AuthSub token=" + auth);
ResponseHandler<String> responseHandler = new BasicResponseHandler();
String responseBody = "";
try {
        responseBody = httpclient.execute(httppost, responseHandler);
} catch (HttpResponseException e) {
        e.printStackTrace();  // This is where I catch the exception
} catch (ClientProtocolException e) {
        e.printStackTrace();
} catch (IOException e) {
        e.printStackTrace();
}
httpclient.getConnectionManager().shutdown();

Any help would be great!
/Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com
To unsubscribe from this group, send email to 
google-docs-data-apis+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to