Guest User

Untitled

a guest
Jul 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. Cursor phoneCur = contentResolver.query( ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
  2. null,
  3. ContactsContract.CommonDataKinds.Phone.CONTACT_ID + " = ?",
  4. new String[] { id },
  5. null);
  6.  
  7. while (phoneCur.moveToNext()) {
  8. // This would allow you get several email addresses
  9. String address = phoneCur.getString(phoneCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DATA));
  10. int type = phoneCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE);
  11. }
  12. phoneCur.close();
Add Comment
Please, Sign In to add comment