比如分享到腾讯微博,分享到微信朋友,等等,

解决方案 »

  1.   

    分享功能很简单的,网上也有很多参考代码。我这里有一段分享图片的代码,你可以参考一下。
                               Intent intent = new Intent(Intent.ACTION_SEND);
    intent.setType("image/*");

    // 添加图片
    File file = new File(photoPath);//photoPath是图片的绝对路径
    Uri uri = Uri.fromFile(file);
    intent.putExtra(Intent.EXTRA_STREAM, uri);
    startActivity(Intent.createChooser(intent, getTitle()));
    这段代码可以实现分享
      

  2.   

    是的,分享很简单。
    戏码是分享文本的代码。会自动匹配到短信,email,微博等
    Intent intentshare=new Intent(Intent.ACTION_SEND);
    intentshare.setType("text/plain");  // 纯文本 intentshare.putExtra(Intent.EXTRA_SUBJECT, "分享");
    intentshare.putExtra(Intent.EXTRA_TEXT, mTitle.getText().toString().trim() + '\n' +
    mText.getText().toString().trim());
    startActivity(Intent.createChooser(intentshare, getTitle()));
      

  3.   

    简单的分享,用楼上两位的就可以了,不过这样分享有很大的依赖性,比如分享到新浪微博,以上分享功能你无法自己定义分享界面,手机没有安装新浪微博客户端的话,也无法分享到新浪微博,简单来说,就是依赖于手机本身安装的应用。
        如果不想依赖,只有在应用中整合第三方平台的sdk了