1，找log，logcat是个好东西，能帮你迅速定位到程序的走向，不光是能找bug哦，有些提示信息能帮你找到一些解决问题的入口点，比如说上次要调用2.2设备的前置摄像头。

2，看官方文档，对这个东西的描述，不要急于找网上的案例。要知道，我们的需求千变万化，网上的案例不见得是符合你的需求的，所以不要乱试一通哈。

3，通过官方的描述，找对应的方法或者在网上搜特定的语句，相信很快就能解决了。

1.这是我在logcat里面翻出来的log，很神奇额。

//  07-27 15:53:08.061: INFO/ActivityManager(2460): Starting activity: Intent { act=android.intent.action.CHOOSER cmp=android/com.android.internal.app.ChooserActivity (has extras) }
//  07-27 15:53:08.846: INFO/ActivityManager(2460): Displayed activity android/com.android.internal.app.ChooserActivity: 771 ms (total 771 ms)
//  07-27 15:53:21.592: INFO/ActivityManager(2460): Starting activity: Intent { act=android.intent.action.SEND typ=image/jpeg flg=0x3000000 cmp=com.sina.weibo/.EditActivity (has extras) }

2.现在就去搜这个intent吧(android.intent.action.CHOOSER)慢慢看不翻译了

Activity Action: Display an activity chooser, allowing the user to pick what they want to before proceeding. This can be used as an alternative to the standard activity picker that is displayed by the system when you try to start an activity with multiple possible matches, with these differences in behavior:
You can specify the title that will appear in the activity chooser.
The user does not have the option to make one of the matching activities a preferred activity, and all possible activities will always be shown even if one of them is currently marked as the preferred activity.
This action should be used when the user will naturally expect to select an activity in order to proceed. An example if when not to use it is when the user clicks on a "mailto:" link. They would naturally expect to go directly to their mail app, so startActivity() should be called directly: it will either launch the current preferred app, or put up a dialog allowing the user to pick an app to use and optionally marking that as preferred.
In contrast, if the user is selecting a menu item to send a picture they are viewing to someone else, there are many different things they may want to do at this point: send it through e-mail, upload it to a web service, etc. In this case the CHOOSER action should be used, to always present to the user a list of the things they can do, with a nice title given by the caller such as "Send this photo with:".
As a convenience, an Intent of this form can be created with the createChooser(Intent, CharSequence) function.


3.好吧，现在搜索吧，关键字：  Android 分享

Intent intent=new Intent(Intent.ACTION_SEND);  基本上都有这个语句，好，再搜这个吧。找个几次基本上就能找到了

<activity android:name=".Writer_Blog" android:label="share to weibo">
<intent-filter>
<action android:name="android.intent.action.SEND">
</action>
<category android:name="android.intent.category.DEFAULT">
</category>
<data android:mimeType="image/*">//这里是要接收send的类型
</data>
</intent-filter>
</activity>


                          Intent it = getIntent();
if (it != null &&  it.getAction() != null && it.getAction().equals(Intent.ACTION_SEND)) {
Bundle extras = it.getExtras();
if (extras.containsKey("android.intent.extra.STREAM")) {
Log.i(TAG, "uri++=" + extras.get("android.intent.extra.STREAM"));
uri = (Uri) extras.get("android.intent.extra.STREAM");
set_image(uri);//这里是将我们所选的分享图片加载出来
}
// 07-27 17:39:44.073: INFO/Writer_Blog(3289): android.intent.extra.STREAM=content://media/external/images/media/1211
}


public List<ResolveInfo> getShareTargets(){
List<ResolveInfo> mApps = new ArrayList<ResolveInfo>();
Intent intent=new Intent(Intent.ACTION_SEND,null);
intent.setType("text/plain");
PackageManager pm=this.getPackageManager();
mApps=pm.queryIntentActivities(intent,PackageManager.COMPONENT_ENABLED_STATE_DEFAULT);
return mApps;
}


Intent intent = new Intent(Intent.ACTION_VIEW);
2 intent.setData(Uri.parse("market://details?id=" + getPackageName()));
3 startActivity(intent);


Intent intent = new Intent(Intent.ACTION_VIEW);