新创建联系人的指示器
除了 RawContacts.VERSION 和 RawContacts.DIRTY 之外,是否还有任何指示符可以告诉我是否已创建新联系人?
现在,我检查联系人数据库中的“脏”联系人,然后如果版本字段大于二,则它是已更改的联系人,否则它是新联系人。
但现在我遇到的问题是,如果我的 SyncAdapter 由于网络问题或服务器问题而无法同步此新联系人,那么如果用户再次更改联系人,在我的 SyncAdapter 有第二次机会上传它之前,我可能会错过它。因为这样 VERSION 字段将大于 2,并且我的同步适配器无法识别该联系人是新联系人。
我检查了两次参考文献,但找不到任何表明它的字段。
任何提示都将受到高度赞赏。
干杯, 阿里3n
Is there any indicator besides RawContacts.VERSION and RawContacts.DIRTY that tells me if a new contact has been created?
Right now I check the contactdatabase for "DIRTY"-contacts and then if the VERSION field is greater two it's a changed contact otherwise it is a new one.
But now I have the problem that if my SyncAdapter fails to sync this new contact due to network problems or server problems I could miss it, if the user change the contact again, befor my syncadapter gets a second chance to upload it. Because then the VERSION field will be greater than two and my syncadapter fails to recognize that this contact is a new one.
I checked the references twice, but can't find any field that would indicate it.
Any hint is highly appreciated.
Cheers,
Ali3n
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想我找到了丢失的拼图:RawContacts.SOURCE_ID
文档说:
I think I found the missing puzzlepiece: RawContacts.SOURCE_ID
Documentation says: