你的位置:首页 > 软件开发 > 操作系统 > Android 分享到微信

Android 分享到微信

发布时间:2015-03-23 20:01:37
1 /** 2 * 分享信息到朋友 3 * 4 * @param file,假如图片的路径为path,那么file = new File(path); 5 */ 6 private void shareToFriend(File file) { 7 ...

Android 分享到微信

 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 (#换成@)。

可能感兴趣文章

我的浏览记录