Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Cursor phoneCur = contentResolver.query( ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
- null,
- ContactsContract.CommonDataKinds.Phone.CONTACT_ID + " = ?",
- new String[] { id },
- null);
- while (phoneCur.moveToNext()) {
- // This would allow you get several email addresses
- String address = phoneCur.getString(phoneCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DATA));
- int type = phoneCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE);
- }
- phoneCur.close();
Add Comment
Please, Sign In to add comment