广播联系人添加/更改?
是否有任何标准广播意图可供我注册 BroadcastReceiver
,以便在添加或更改联系人时触发该广播意图?我已经浏览文档有一段时间了,但没有找到任何东西。也许它隐藏在某个深处,而你们中的一个人知道在哪里。
Is there any standard broadcast intent that I can register a BroadcastReceiver
for that gets triggered whenever a contact is added or changed? I've been looking through the docs for a while now but haven't found anything. Maybe it's hidden somewhere deep and one of you guys knows where.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在这里回答我自己的问题(如果有人有更好的答案,请不要害羞)。
添加/更改联系人时不会广播。但是,当您在
RawContacts
表您有一个DIRTY
列,如果自上次同步以来联系人发生更改,则为
1
,这正是我正在寻找的内容。Here I go answering my own question (if anyone has a better answer, don't be shy).
There's no broadcast when a contact is added/changed. However, when you look up your contacts in the
RawContacts
table you have aDIRTY
column which is1
if the contact was changed since the last sync, which is pretty much what I was looking for.