【发布时间】:2017-12-13 07:55:05
【问题描述】:
在我的应用程序中通过 Intent 打开 Gmail。 我添加了超链接意图额外文本,它不适用于 Android OS 5 及更高版本,但它在 OS 4.3 上运行良好
请告诉我有什么问题。请参考下面的代码。
注意:直接链接 [https://www.google.co.in/] 在所有 Android 操作系统上都可以正常工作。
代码:
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.setType("text/html");
sharingIntent.putExtra(Intent.EXTRA_TEXT, Html.fromHtml("<a href=https://www.google.co.in/>Google</a>");
startActivity(Intent.createChooser(sharingIntent,"Share using"));
【问题讨论】:
标签: android gmail android-5.0-lollipop android-6.0-marshmallow android-4.3-jelly-bean