Add a custom field to a phone number

后端 未结 4 1621
执念已碎
执念已碎 2021-01-01 05:34

Am building an app that requires a custom contact field (\'whitelist\', if you were wondering) for every phone number.

However, I only found a way of saving custom d

4条回答
  •  一个人的身影
    2021-01-01 06:12

    As the class Contact is deprecated and has been superseded by ContactsContract, you 'd better try the new one. The newer APIs allow access multiple accounts and support aggregation of similar contacts.

    For the new Phone class, it has defined three columns.

    • String NUMBER DATA1
    • int TYPE DATA2
    • String LABEL DATA3

    I think you can use the Label column of ContactsContract.CommonDataKinds.Phone

提交回复
热议问题