简体   繁体   中英

how to launch picasa from my app(android)

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..

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);

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"));
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM