0
我嘗試在現有的聯繫人添加地址:添加新的郵政地址,現有的聯繫人
// insert
operations.Add(ContentProviderOperation.NewInsert(ContactsContract.Data.ContentUri)
.WithValue(ContactsContract.Data.InterfaceConsts.ContactId, contact.Id)
.WithValue(ContactsContract.Data.InterfaceConsts.RawContactId, GetRawContactId(contact.Id))
.WithValue(ContactsContract.Data.InterfaceConsts.Mimetype, ContactsContract.CommonDataKinds.StructuredPostal.ContentItemType)
.WithValue(ContactsContract.CommonDataKinds.StructuredPostal.Pobox, address.PoBox)
.WithValue(ContactsContract.CommonDataKinds.StructuredPostal.Street, address.Street)
.WithValue(ContactsContract.CommonDataKinds.StructuredPostal.City, address.City)
.WithValue(ContactsContract.CommonDataKinds.StructuredPostal.Postcode, address.Postcode)
.WithValue(ContactsContract.CommonDataKinds.StructuredPostal.Country, address.Country)
.WithValue(ContactsContract.CommonDataKinds.CommonColumns.Type, GetAddressContactInfoType(address.InfoType))
.Build());
,但我得到的是一個
Android.Content.OperationApplicationException: insert failed
有什麼建議?
非常感謝你提前
完整堆棧跟蹤:http://pastebin.com/695PKf3V – metagen