I know how I can get all contacts in Android , and how to get their phone number.
What I cant seem to figure out is how to get a contact by phone number...
This is my current piece of code I wrote to test which phone numbers are available:
// Create a cursor
Cursor cursor = Base.contentResover().query(Phone.CONTENT_URI, null, null,
null, null);
if (cursor.moveToNext()) {
Log.d("CALLOG", cursor.getString(cursor.getColumnIndexOrThrow(Phone.NUMBER)));
}
The problem is that i only get a few phone numbers returned, while i expect to get all... What am I doing wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…