1 reasons:
In development, we often encounter the ability to add contacts from the Address book, but suddenly one day someone told me that my address Book add no SIM contact, and others have, this let me very puzzled, what situation, finally found the reason, recorded.
2 Solution:
This is the code that can choose the SIM card contact:
private void Openphonenum () {Intent Intent = new Intent (Intent.action_pick, CommonDataKinds.Phone.CONTENT_URI); Startactivityforresult (Intent, select_from_num);}
This is the code that does not have a SIM card contact person:
private void Openphonenum () {Intent Intent = new Intent (Intent.action_pick, ContactsContract.Contacts.CONTENT_URI); Startactivityforresult (Intent, select_from_num);}
Do you see the difference? Although they are all content_uri but different packages, so the result is not the same.
"Android" Add a contact from your address book--A detail you don't know