Android - 打开电子邮件应用程序?

标签 android email android-activity android-intent

我想在我的安卓应用上打开电子邮件应用: 以下代码崩溃 我做错什么了吗?请提供代码

Intent i = new Intent (Intent.ACTION_SEND,Uri.fromParts("mailto", "testemail@gmail.com", null));
this.startActivity(i);

最佳答案

试试这个:

    Intent intent = new Intent(Intent.ACTION_VIEW);
    Uri data = Uri.parse("mailto:"
            + "xyz@abc.com"
            + "?subject=" + "Feedback" + "&body=" + "");
    intent.setData(data);
    startActivity(intent);

关于Android - 打开电子邮件应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5333119/

相关文章:

java - Android:edittext - 在字母后键入两个空格用句点替换第一个空格

android - 即使打开了 USB 调试,设备也不会在 eclipse 中显示

html - 在经典 asp 中发送邮件时出现 URL 问题

android - 如何避免不同 Android API 版本出现 NoClassDefFoundError

android - finish() 未完成 Activity : Android

java - 保存图像到解析

android - ListView 不更新行 View

android - 发送任何短信显示图标显示消息在Andorid中是 "pending to networks"和 "delivered to network"

javascript - 将谷歌可视化图表发送到电子邮件

php - Laravel 5.5 mailgun 不发送电子邮件 - 没有错误