1

I want to upload a photo to picasa web album through from android using data api. i see this link https://developers.google.com/picasa-web/docs/2.0/developers_guide_java but this does not help me at all. can any one give an example code to upload a photo to picasa web album or other tutorial. Thanks

1 Answer 1

2

This is the official code sample for uploading a Image,

URL albumPostUrl = new URL("https://picasaweb.google.com/data/feed/api/user/username/albumid/albumid"); PhotoEntry myPhoto = new PhotoEntry(); myPhoto.setTitle(new PlainTextConstruct("Puppies FTW")); myPhoto.setDescription(new PlainTextConstruct("Puppies are the greatest.")); myPhoto.setClient("myClientName"); MediaFileSource myMedia = new MediaFileSource(new File("/home/liz/puppies.jpg"), "image/jpeg"); myPhoto.setMediaSource(myMedia); PhotoEntry returnedPhoto = myService.insert(albumPostUrl, myPhoto); 

A complete example code is available here,

Connect to Picasa album from Android using OAuth2

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. I've gotten to that stage. I'm still trying to get a camera Bitmap to be uploaded directly to Picasa.