只有电子邮件应用程序来解决的意向 [英] Only Email apps to resolve an Intent
问题描述
我有一个问题..我只想电子邮件活动,以解决意向ACTION.SEND但邮件身边我得到的其他应用程序,以及(如TUBEMATE),即使我已经设置了MIME类型为信息/ RFC822......任何想法我如何能得到的电子邮件应用程序来解决这个问题。
字符串recepientEmail =; //或者设置为目标电子邮件或保留为空
意向意图=新的意图(Intent.ACTION_SENDTO);
intent.setData(Uri.parse(电子邮件地址:+ recepientEmail));
startActivity(意向);
关键是使用 ACTION_SENDTO
作为动作和的mailto:
数据。如果你想要让用户指定目的地的电子邮件,只使用的mailto:
;如果指定电子邮件自己,用的mailto:name@domain.com
建议的方法,筛选所有的应用程序,可以发送电子邮件(如默认的电子邮件应用程序或Gmail)
I have a problem .. I want only email activities to resolve intent ACTION.SEND but beside email I get other apps as well (e.g TubeMate) even though I have set the mime type as 'message/rfc822' ... Any idea how can I get Email applications to resolve it ..
String recepientEmail = ""; // either set to destination email or leave empty
Intent intent = new Intent(Intent.ACTION_SENDTO);
intent.setData(Uri.parse("mailto:" + recepientEmail));
startActivity(intent);
The point is to use ACTION_SENDTO
as action and mailto:
as data. If you want to let the user specify the destination email, use just mailto:
; if you specify email yourself, use mailto:name@domain.com
Suggested method filters all the application, that can send email(such as default email app or gmail)
这篇关于只有电子邮件应用程序来解决的意向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!