/**
* 分享
*/
public static void shareStr(Context context , String str){
Intent it = new Intent(Intent.ACTION_SEND); // 启动分享发送的属性
it.setType("text/plain"); // 分享发送的数据类型
it.putExtra(Intent.EXTRA_SUBJECT, "装修大师"); // 分享的主题
it.putExtra(Intent.EXTRA_TEXT, str+"\nAPP下载链接如下:http://www.hongshanwang.com/resource/download.html"); // 分享的内容
it.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);// 这个也许是分享列表的背景吧
context.startActivity(Intent.createChooser(it, "选择装修大师,圆您居家梦想。"));// 目标应用选择对
}
android之分享
最新推荐文章于 2022-07-31 20:25:35 发布