
/**
* share some text information
* @param context
* @param title
* @param text
*/
public static void shareText(Context context, String title, String text) {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, title);
intent.putExtra(Intent.EXTRA_TEXT, text);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(Intent.createChooser(intent, title));
}



初级程序员
by: 云代码会员 发表于:2013-04-21 15:10:20 顶(0) | 踩(0) 回复
顶一下,沙发
回复评论