andrioid 分享到其它(短信,qq,微信等功能)
1 public static void share(Context context, String text) { 2 Intent intent = new Intent(Intent.ACTION_SEND); 3 intent.setType("text/plain"); 4 intent.putExtra(Intent.EXTRA_SUBJECT, ""); 5 intent.putExtra(Intent.EXTRA_TEXT, text); 6 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 7 context.startActivity(Intent.createChooser(intent, "分享")); 8 }