How can I get the default phone and SIM contact's ACCOUNT_TYPE and ACCOUNT_NAME?

不羁岁月 提交于 2021-02-17 04:45:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!