Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/178.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 与图像共享HTML链接_Android_Share - Fatal编程技术网

Android 与图像共享HTML链接

Android 与图像共享HTML链接,android,share,Android,Share,我知道如何与图像共享普通文本,但我想与图像共享html链接。如果用户将共享它,而第二个用户将单击该链接,则会在应用程序上打开特定活动 到目前为止我都试过了 Intent share = new Intent(Intent.ACTION_SEND); share.setType("image/jpeg"); String textToShare = "Check out <a href=\"www.activetoo.app.com\\launch\">" + service_prov

我知道如何与图像共享普通文本,但我想与图像共享html链接。如果用户将共享它,而第二个用户将单击该链接,则会在应用程序上打开特定活动

到目前为止我都试过了

Intent share = new Intent(Intent.ACTION_SEND);
share.setType("image/jpeg");
String textToShare = "Check out <a href=\"www.activetoo.app.com\\launch\">" + service_provider.businessName + "</a>";
share.putExtra(Intent.EXTRA_TEXT, textToShare);
share.putExtra(Intent.EXTRA_STREAM, 
Uri.parse("file:///sdcard/temporary_file.jpg"));
startActivity(Intent.createChooser(share, "Share Image"));
Intent共享=新的Intent(Intent.ACTION\u发送);
share.setType(“图像/jpeg”);
字符串textToShare=“签出”;
share.putExtra(Intent.EXTRA_TEXT,textToShare);
share.putExtra(Intent.EXTRA_流,
解析file:///sdcard/temporary_file.jpg"));
startActivity(Intent.createChooser(共享,“共享图像”));

这只是将文本作为普通纯文本发送。

尝试更改您的mime类型=shareIntent.setType(“text/plain”)@IvanBarayev,不包括图像。尝试更改mime类型=shareIntent.setType(“text/plain”)@伊万巴拉耶夫,那不包括这张照片。