android - Writing SQLite statement to retrieve all contacts information -
After the
I need to write a SQLite statement to retrieve all HAS_PHONE_NUMBER
columns and _ Id
to contact
table (where all phone contacts reside).
I hope this will look something like this:
Do I contact HAS_PHONE_NUMBER, _ID
from me in fact Code is required, where I can get the record from the Android Phonebook (an array or list through the above statement)
like this:
if (integer parseInt (cur.getString (cur.getColumnIndex (ContactsContract.Contacts.HAS_PHONE_NUMBER))) gt; {cursor pCur = cr .query (ContactsContract.CommonDataKinds.Phone.CONTENT_URI, Null, ContactsContract.CommonDataKinds.Ph One.CONTACT_ID + "=?", New string [] {id}, tap); While (pCur.moveToNext ()) {// Do something with the phone} pCur.close (); }
Comments
Post a Comment