Change:
String selection = ContactsContract.Contacts.DISPLAY_NAME + " IS NOT NULL";
to:
String constraint = "Lau";
String selection =
ContactsContract.Contacts.HAS_PHONE_NUMBER + "=1"
+ " AND "
+ ContactsContract.Contacts.DISPLAY_NAME + " LIKE '%" + constraint + "%'";
Title: Query Contacts database, selection with AND to combine more cause.
Rating: 100% based on 99998 ratings. 10 user reviews.
Post by 6:32 AM
Rating: 100% based on 99998 ratings. 10 user reviews.
Post by 6:32 AM
0 comments:
Post a Comment