Can someone help me understand why the phone numbers all show up as null with this?
private void queryContactPhoneNumber() { String[] cols = new String[] {People.NAME, People.NUMBER}; Uri myContacts = People.CONTENT_URI; Cursor mqCur = managedQuery(myContacts,cols,null,null,null); if (mqCur.moveToFirst()) { String myname = null; String mynumber = null; do { myname = mqCur.getString(mqCur.getColumnIndex(People.NAME)); mynumber = mqCur.getString(mqCur.getColumnIndex(People.NUMBER)); Toast.makeText(this, myname + " " + mynumber, Toast.LENGTH_SHORT).show(); } while (mqCur.moveToNext()); } } It's from this book: Android Apps for Absolute Beginners -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en