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..
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);
You can iterate over the list. See ResolveInfo
documentation for fields of interest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With