gpt4 book ai didi

android - 通过 Gmail 发送带有自定义方案的链接

转载 作者:行者123 更新时间:2023-11-29 15:20:26 25 4
gpt4 key购买 nike

我正在尝试发送打开我的 Android 应用程序的深层链接:

String body = "<a href=\'myscheme://myurl?Id=37\'>Link to simulation</a>";
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("text/html");
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "share");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(body));
startActivity(Intent.createChooser(emailIntent, "Email:"));

但是当我通过桌面 chrome 浏览器收到包含上述代码的电子邮件和我的 Gmail 时,我只收到纯文本。
当我发送 http://myurl 时,我确实得到了链接。

是否可以发送带有自定义方案的链接?

最佳答案

使用 tinyurl api 生成短链接 http://tinyurl.com/api-create.php?url=myscheme://myurl?Id=37 你得到 http://tinyurl.com/ofmudsw

关于android - 通过 Gmail 发送带有自定义方案的链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18944105/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com