How about ContactsContract.CommonDataKinds.Email
?
Contact information in android
質問
i want to get the email associated with the contact like i have a number that has a email id also. how to get that email address i am using code
Cursor cur = cr2.query(
ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, null,
null, null);
while (cur.moveToNext()) {
try {
Cobj = new JSONObject();
Cobj.put(
"name",
cur.getString(cur
.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME)));
Cobj.put(
"number",
cur.getString(cur
.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)));
arContactsobj.put(aC, Cobj);
aC++;
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
解決
所属していません StackOverflow