问题
I want to get the default phone and SIM ACCOUNT_NAME and ACCOUNT_TYPE.
On some devices, when I try to save a contact, it is not showing in the default Contact app of the device (like SONY or ASUS).
It doesn't work when I try to pass null at ACCOUNT_NAME and ACCOUNT_TYPE, when saving the contact by bulk insertion.
回答1:
Each device maker puts whatever it wants as the account type and name for the phone's phone-contacts, I've compiled a list for the major makers here: https://stackoverflow.com/a/44802016/819355
Regarding SIM contacts, almost all makers use: vnd.sec.contact.sim
as account_type, except OPPO which uses: com.oppo.contacts.sim
.
If you have any items to add to these lists, please add in comments.
来源:https://stackoverflow.com/questions/45768948/how-can-i-get-the-default-phone-and-sim-contacts-account-type-and-account-name