Android的:如何获得本地客户端的电子邮件软件包名称 [英] Android: How to get the native Email clients package name

查看:148
本文介绍了Android的:如何获得本地客户端的电子邮件软件包名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在三星设备的 com.sec.android.email 是默认的内置邮件客户端,但在HTC是的 com.htc.android.mail ..我的问题是有没有什么办法让Android设备的默认邮件客户端软件包名称而不考虑不同公司的建立。

In Samsung devices com.sec.android.email is the default In-Built Mail client, but in HTC it is com.htc.android.mail.. My question is is there any way to get the default mail client package name in android device irrespective of the different company builds..

推荐答案

这是不是一个完整的答案,但这里是如何得到活动的清单,可以发送消息/ RFC822

This isn't a complete answer, but here is how to get a list of Activities that can send message/rfc822:

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("message/rfc822");
PackageManager pkgManager = context.getPackageManager();
List<ResolveInfo> activities = pkgManager.queryIntentActivities(intent, 0);

您可以通过列表进行迭代。请参见 ResolveInfo 感兴趣领域的文档。

You can iterate over the list. See ResolveInfo documentation for fields of interest.

这篇关于Android的:如何获得本地客户端的电子邮件软件包名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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