【问题标题】:Unable to share Image using Intent Share Android无法使用 Intent Share Android 共享图像
【发布时间】:2015-10-20 14:59:54
【问题描述】:

尝试使用 Intent Share 将图像发送到 Facebook 和 Whatsapp。但是,代码中似乎没有错误, 但无法在 Whatsapp 和 Facebook 中发送,它给了一个祝酒词:

分享失败,请重试

这是我使用的代码,不知道是什么原因造成的?

Intent shareIntent = new Intent();
public void shareIt(View view)
{
    shareIntent.setAction(Intent.ACTION_SEND);
    shareIntent.setType("image/jpeg");
    shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///data/user/0/obx.com.futurister/files/newImage.jpg"));
    startActivity(Intent.createChooser(shareIntent, "Share image using"));
}

【问题讨论】:

    标签: android facebook android-intent


    【解决方案1】:

    如果您的 android 版本是 marshmallow,您应该打开 Facebook 和 WhatsApp 的存储权限。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-11-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-07
      • 2015-12-01
      • 2013-01-05
      相关资源
      最近更新 更多