1 /** 2 * 分享信息到朋友 3 * 4 * @param file,假如图片的路径为path,那么file = new File(path); 5 */ 6 private void shareToFriend(File file) { 7 ...
1 /** 2 * 分享信息到朋友 3 * 4 * @param file,假如图片的路径为path,那么file = new File(path); 5 */ 6 private void shareToFriend(File file) { 7 Intent intent = new Intent(); 8 ComponentName componentName = new ComponentName("com.tencent.mm", "com.tencent.mm.ui.tools.ShareImgUI"); 9 intent.setComponent(componentName);10 intent.setAction(Intent.ACTION_SEND);11 intent.setType("image/*");12 intent.putExtra(Intent.EXTRA_TEXT, "测试微信");13 intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));14 startActivity(intent);15 }
原标题:Android 分享到微信
关键词:Android
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。