问题描述
是否有任何标准的广播 Intent 可以注册 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.
推荐答案
我来回答我自己的问题(如果有人有更好的答案,请不要害羞).
Here I go answering my own question (if anyone has a better answer, don't be shy).
添加/更改联系人时没有广播.但是,当您在 RawContacts
表你有一个 DIRTY
列是 1
如果自上次同步以来联系人已更改,这几乎是我正在寻找的内容.
There's no broadcast when a contact is added/changed. However, when you look up your contacts in the RawContacts
table you have a DIRTY
column which is 1
if the contact was changed since the last sync, which is pretty much what I was looking for.
这篇关于广播联系人添加/更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!