gpt4 book ai didi

android - 发送电子邮件时,没有应用程序可以执行此操作

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:15:56 24 4
gpt4 key购买 nike

Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, text.getText());
sendIntent.setType("message/rfc822");
startActivity(Intent.createChooser(sendIntent, "Send email with"));

这是我的代码。

我试过在模拟器中发送邮件。但它显示没有应用程序可以执行此操作。如果有人知道意味着告诉我

提前致谢

最佳答案

您需要使用 text/plain

intent.setType("text/plain");

此外,Intent.ACTION_SEND 是为共享而设计的,您可能希望使用 Intent.ACTION_SENDTO 来仅获取电子邮件客户端列表,或者避免共享Facebook、Twitter 等应用程序。

关于android - 发送电子邮件时,没有应用程序可以执行此操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28588255/

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