android contacts provider: how to set phone number primary
问题 How to set a contact's phone number to be primary number when adding or updating a contact building a custom contacts provider. The adding and updating of contacts is working fine but I don't know how to set one number of the contact to be primary, or default number. 回答1: mValues.put(Phone.IS_PRIMARY, 1); mValues.put(Phone.IS_SUPER_PRIMARY, 1); Both Phone.IS_PRIMARY and Phone.IS_SUPER_PRIMARY have to be set. 回答2: I had the same problem, my solution is: ContentProviderOperation.Builder bld =