Android的 - 有没有万无一失的方法,只显示可能的电子邮件客户端? [英] Android - Is there a foolproof way to only show possible EMAIL clients?

查看:110
本文介绍了Android的 - 有没有万无一失的方法,只显示可能的电子邮件客户端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Android中,你可以通过Intent.ACTION_SEND意图发送电子邮件,但(即使您指定一个类型的文本/纯),这将弹出消息和其他的东西。

In android, you can send an email via the Intent.ACTION_SEND intent, but this will bring up messaging and other things (even if you specify a type of text/plain).

如果您希望用户只能看到可能的电子邮件客户端,有没有万无一失的,稳健的方式来做到这一点?

If you want to the user to only see possible EMAIL clients, is there a foolproof, robust way to do that?

推荐答案

使用 ACTION_SENDTO 至mailto: 乌里指向你想要的电子邮件地址。

Use ACTION_SENDTO and a mailto: Uri pointing to the email address you want.

如果你没有一个电子邮件地址,然后你的应用程序不应该试图限制用户的电子邮件。请让用户共享用户希望用户如何想。

If you do not have an email address, then your app should not be trying to limit the user to email. Please let the user share what the user wants how the user wants.

BTW,MIME类型为文本/纯,而不是纯/文。还有为 ACTION_SEND 片段漂浮有错误的MIME类型。

BTW, the MIME type is text/plain, not plain/text. There's a snippet for ACTION_SEND floating around that has the wrong MIME type.

这篇关于Android的 - 有没有万无一失的方法,只显示可能的电子邮件客户端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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