Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. Cursor cursor = Cursor cursor = this.getContentResolver().query(
  2. Uri.parse("content://com.android.contacts/data/5"),
  3. new String[]{Contacts._ID, Contacts.DISPLAY_NAME, Phone.NUMBER}
  4. , null, null, null);
  5. try {
  6. if (cursor.moveToFirst()) {
  7. Log.d("Show Display name :", cursor.getString(1));
  8. Log.d("Show number: ", cursor.getString(2));
  9. }
  10. } finally {
  11. cursor.close();
  12. }
  13. }
  14.  
  15. Show Display name : 4kgjtmw Gkgjtj
  16. Show number: 4kgjtmw Gkgjtj
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement