Picasa access in android: PicasaUploadActivity -


I'm new to Android, and I'm struggling to decide which devices are available to me I am developing Android 2.0.1 for now, just because my device runs.

Specifically, I am writing an app that I would like to upload images to an album. I'm pretty sure that it is supported; For example, the (Google?) Photo viewer created in it has a 'share' button with the Picasa option, and there is also a small sample code with snippet

[credit code! If it is against these rules, then apologize.]

  temp.setComponent (new element name ("com.google.android.apps.uploader", "com. Google.android. Apps.uploader.picasa.PicasaUploadActivity ")); StartActivityForResult (temp, PICASA_INTENT)  

Which is exactly what I want.

But I can not find any documents anywhere. I am not really clear to use such resources. From the eclipse, do I need to include another project, com.google.android.apps.uploader ? If so, how do I get it? How do I include it? Have any work sample code given to see any glimpse of me?

video (40th min)

  public class of PostPhotoActivity Activity Expands {@ Override Protected Zero to Create (Intstance saved from Bundle) {Super. Contents (Saved Instantstate); Try {HttpRequestFactory requestFactory = New NetHttpTransport (). CreateRequestFactory (); Intent = getIntent (); Bundle Extras = Intent. Getextros (); InputStreamContent content = new InputStreamContent (); Controller Content Resolver = getContentResolver (); Uri Uri = (Uri) Extras. Nutmeg (Intent.EXTRA_STREAM); Content.inputStream = contentResolver.openInstreamStream (Yuri); Cursor cursor = contentResolver.query (Yuri, empty, empty, empty, empty); Cursor.moveToFirst (); Content.type = intent.getType (); Content.length = cursor.getLong (cursor.getColumnIndexOrThrow (Images.media.SIZE)); HttpRequest request = requestFactory.buildPostRequest (new GenericUrl ("https://picasaweb.google.com/data/feed/api/user/default/albumid/default"), content); GoogleHeaders Header = New GoogleHeaders (); Request.headers = header; String filename = cursor.getstring (cursor.gateindor xterto (images media.dijgen)); Headers.setSlugFromFileName (file name); . Ignore Request.execute (); } Grip (IOException E) {// TODO Auto-Generated Catch Block e.printStackTrace (); }}}  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -