播出的接触添加/更改? [英] Broadcast on contact add/change?

查看:103
本文介绍了播出的接触添加/更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有什么标准的广播意图,我可以注册一个的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 表你有一个<一个href="http://developer.android.com/reference/android/provider/ContactsContract.SyncColumns.html#DIRTY"相对=nofollow> DIRTY 列是 1 如果接触是自上次同步更改,这是pretty的太多我所期待的。

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.

这篇关于播出的接触添加/更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆