开发者

how to add custom contact field in android contacts

i want to add a custom contact label like (home,mobile,work,MY_LABEL) while adding a contact from my application and fetch the number from my custom label as well.

OR if it is not possible c开发者_如何学Can i add a new field like (phone,email) with my custom field.

Please someone has any idea how to do this.

Thanks


Yes it is possible to add custom contact label. For this, you have to create a SyncAdapter & Authenticator and then create a Account. Declare the new custom field you need to add as meta value for SyncAdapter in Manifest file

Look into SampleSyncAdapter code in google project for an example. Also, I found this link as very useful reference- http://www.c99.org/2010/01/23/writing-an-android-sync-provider-part-2/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜