Android 如何检测哪个联系人发生了变化?
有没有办法确定哪个联系人发生了变化?
我知道我可以为 URI 注册一个 ContentObserver,但它仅在某些内容发生变化时才会触发,我该如何知道哪个联系人发生了变化以及该联系人发生了什么变化?有办法找出来吗?
我的应用程序涉及桌面客户端,我不希望每次连接时都将所有联系人发送到桌面。所以我想跟踪自上次桌面连接以来发生的变化。
提前致谢!
ps 我使用的是 API 级别 5+
Is there a way to determine which contact changed?
I know I can register a ContentObserver for the URI but it only triggers when something changes, how am I supposed to know which contact changed and what changed for that contact? Is there a way to find out?
My app involves a desktop client and I would prefer not to send all of the contacts over to the desktop every time it connects. So I would like to keep track of what has changed since the last time the desktop connected.
Thanks in advance!
p.s. I'm using API Level 5+
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,无法
从我与此主题相关的回复中获取哪个联系人更改了 c&p 此处
我的应用程序基类中有此代码。
关于您可以在投影中放入的内容,请检查此处
希望如此帮助
No there is no way to get which contact had changed
c&p from my response related with this topic here
I have this code in my Application base class.
Regarding about what you can put in projection check here
Hope this helps