0

i have a picasa app installed on my emulator,i just want to launch that picasa app from my application...

please any one give the code to launch picasa..

manju
  • 847
  • 3
  • 16
  • 43
  • Do you want to launch only Picasa or other apps too? I mean do you want to display other shareable options too other than Picasa? – Prashanth Babu Nov 26 '10 at 06:08
  • hi thanks for your asking.... right now i just want to launch picasa... – manju Nov 26 '10 at 06:19
  • @manju any idea share some thing http://stackoverflow.com/questions/12363054/android-how-to-get-and-show-picasa-images-in-my-android-application – NagarjunaReddy Sep 12 '12 at 14:36

2 Answers2

0

This is more less or less the snippet to share your stuff with other apps except that you specify a specific Component for Picasa. Try this once on a device. Am not sure how it works on emulator.

final int PICASA_INTENT_RESULT = 100;

final Intent picasaIntent = new Intent(Intent.ACTION_SEND); 
picasaIntent.setType("image/*"); 
picasaIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); 
picasaIntent.putExtra(Intent.EXTRA_STREAM, imageUri); 
picasaIntent.setComponent(new ComponentName("com.google.android.apps.uploader", "com.google.android.apps.uploader.picasa.PicasaUploadActivity")); 
startActivityForResult(picasaIntent, PICASA_INTENT_RESULT);
Prashanth Babu
  • 208
  • 2
  • 5
  • hi thank a lot..but i still need a little help from you..what i should place in the "imageUri" field of picasaIntent.putExtra();... – manju Nov 26 '10 at 07:33
  • hi its working but only i need to give proper imageUri data plz plz help me out.. – manju Nov 26 '10 at 08:59
  • Give the Uri of the image which you want to open in Picasa. – Prashanth Babu Nov 26 '10 at 09:25
  • This code is for uploading an image from your device to Picasa. You can give an Uri of an image which is on your device and pass it on to Picasa to upload. – Prashanth Babu Nov 26 '10 at 10:30
  • yes i have given the image path as "mnt/sdcard/screenshots/screenshot_17"(it's the path of an image stored in gallery) but got runtime error...and actually i want to launch the whole stand alone picasa app,not to just upload images to picasa web album... – manju Nov 26 '10 at 10:59
  • Get the image Uri from Gallery and later add it to the intent as: picasaIntent.putExtra(Intent.EXTRA_STREAM, imageUri.toString()); this should go thru and should start uploading your pic to Picasa. And also test this on actual device. – Prashanth Babu Nov 26 '10 at 11:16
  • yes you are right i will try to get the image with the help of some get methods... its ok but as i told before i want to launch the original picasa application which is on my emulator screen as it is.. – manju Nov 26 '10 at 11:48
  • hi Prashanth the run time error which i was getting was because since there is no package called com.google.android.apps.uploader. i am getting PackageManager.NameNotFoundException exeption..plz help me – manju Nov 27 '10 at 07:33
0

You need to know the package name of Picasa.

Here is a example to launch the browser in Android:

public void doLaunch(View caller) {
    PackageManager packageManager = getPackageManager();
    startActivity(packageManager.getLaunchIntentForPackage("com.android.browser"));
}
Sebastian Roth
  • 11,344
  • 14
  • 61
  • 110
  • hi great answer.. one problem here is ,i know the package name of picasa that is com.google.android.apps.upload but using this i am getting run time error.....plz help me.. – manju Nov 26 '10 at 09:51
  • ok thanks..hi where can i get all packages related to android(android-google,web-android)... – manju Nov 26 '10 at 11:14
  • can u use `adb logcat` to get the log for us? – Sebastian Roth Nov 26 '10 at 11:32