1gravity / Android-ContactPicker

A beautifully designed component to pick one or several contacts (including groups) from the Android contacts list
Apache License 2.0
66 stars 33 forks source link

How to tell if Contact has HOME or WORK email? #38

Open ToysoftInc opened 6 years ago

ToysoftInc commented 6 years ago

When some contacts don't have WORK email address. The following will return the same email address.

Log.d("Contact", "Home="+contact.getEmail(ContactsContract.CommonDataKinds.Email.TYPE_HOME)); Log.d("Contact", "Work="+contact.getEmail(ContactsContract.CommonDataKinds.Email.TYPE_WORK));

Is there a why to tell if the contact has HOME or WORK email?