Android Get contacts in Custom View only -
samsung galaxy s6 edge, android 6.0.1, microsoft exchange active sync.
i have custom view contacts restricted exchange (outlook) main contacts only. there achived contacts list not included in custom view. on phone contacts see main list want
in app query contact database person , works ok. however, people achived contacts.
string partial = "henry" contentresolver contentresolver = getcontentresolver(); uri contacturi = uri.withappendedpath(contactscontract.commondatakinds.phone.content_filter_uri, uri.encode(partial)); cursor namecursor = contentresolver.query(contacturi, null, null, null, null); if (namecursor != null) { ...
i henrys both archived list , main list. how restrict search main list only?
found workaround although there must more elegant approach:
int visible = namecursor.getint(namecursor.getcolumnindex(contactscontract.phonelookup.in_visible_group)); if (visible > 0) { ...
Comments
Post a Comment