ACTION_SEND力电子邮件发送 [英] ACTION_SEND force sending with email

查看:256
本文介绍了ACTION_SEND力电子邮件发送的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我创建一个动作从我的应用程序发送电子邮件,它会提示很多选择,包括QR客户端...

every time i create an action for sending an email from my app, it prompts to many options including a QR client...

有没有办法强制通过电子邮件客户端只发送?

Is there a way to force sending via email clients only?

code发送的电子邮件

String rec[] = { owner.email };
i = new Intent(Intent.ACTION_SEND);
i.setType("text/plain");
i.putExtra(android.content.Intent.EXTRA_EMAIL, rec);
i.putExtra(android.content.Intent.EXTRA_SUBJECT, "RE: " + desc);
i.putExtra(android.content.Intent.EXTRA_TEXT,
        "\n\n\nSent from Mojo for Android");
startActivity(i);

截图供会发生什么,当我推出这个

Screenshot for what happens when I launch this

推荐答案

尝试的setType 消息/ RFC822 ,而不是文本/纯

Try to setType message/rfc822 instead of text/plain

这篇关于ACTION_SEND力电子邮件发送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆