I'm afraid you are a very long way from achieving your objective.

My recommendation would be to study the Picasa Android API example.
Get it working on your device, understand it, and then adapt it for
Spreadsheets.

the link to the sample is here:
http://code.google.com/p/google-api-java-client/source/browse?repo=samples#hg%2Fpicasa-atom-android-sample

Pay particular attention to the following:
- Oauth - its done a lot differently in Android compared to your web
application
- Services - If I recall correctly for Spreadsheets you will need
Authorization to 2 services:  Google Docs to get a list of documents
and then Spreadsheet service to read/write the spreadsheets themselves
- Namespaces - I can't even start to describe what a PITA this can be

If you haven't already worked it out - what you are trying to do is
not trivial.


On Apr 14, 6:16 am, Reptil <christophepeix...@gmail.com> wrote:
> Hi,
> I have already made a Web Application using the Google Spreadsheets
> API with the following code giving my the liste of spreasheets i have
> in my google account:
>
> SpreadsheetService service = new SpreadsheetService("exampleCo-
> exampleApp-1");
> service.setUserCredentials("j...@gmail.com", "mypassword");
>
> URL metafeedUrl = new URL("https://spreadsheets.google.com/feeds/
> spreadsheets/private/full");
> SpreadsheetFeed feed = service.getFeed(metafeedUrl,
> SpreadsheetFeed.class);
> List<SpreadsheetEntry> spreadsheets = feed.getEntries();
> for (int i = 0; i < spreadsheets.size(); i++) {
>   SpreadsheetEntry entry = spreadsheets.get(i);
>   System.out.println("\t" + entry.getTitle().getPlainText());
>
> }
>
> But that doesnt work in an Android Application because the gdata
> library doesnt work with it.
> So i have already know that i must work with the google-api-java-
> client library..but i doesnt know how to make the conection with my
> google docs account,like i have made above,but for Android ( working
> with the  google-api-java-client library)
>
> In the example here:http://code.google.com/p/gdata-java-client/wiki/
> MigratingToGoogleApiJavaClient
>
> We have:
> HttpRequest request = transport.buildGetRequest();
>   request.url = url;
>   VideoFeed videoFeed = request.execute().parseAs(VideoFeed.class);
> But in my own code i have:
> HttpRequest request = transport.buildGetRequest();
>                     request.url = metafeedUrl;
>                     SpreadsheetFeed feed =
> request.execute().parseAs(SpreadsheetFeed.class);
> But SpreadsheetFeed is not a type of feed in this library.Wich kind of
> feed i should have their?
>
> Thank You

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to