【问题标题】:Is there a Way to Get the Contacts Changes in Android有没有办法在 Android 中获取联系人更改
【发布时间】:2014-12-07 14:14:33
【问题描述】:

我正在创建一个应用程序,其中一部分我必须定期检查联系人。但是,如果我收到通知会很好,每当在 Android 的联系人数据库中添加、删除或更新任何联系人或发生任何联系人事件时。有没有办法做到这一点,我能得到这些改变吗?

Even if i don't get those changes its still OK but i wanna get notify that something has changed in Contact Database.

I tried but don't find any solution.

【问题讨论】:

    标签: android sqlite android-4.0-ice-cream-sandwich android-contacts android-4.4-kitkat


    【解决方案1】:

    实现一个 BroadCastReceiver 并在 ContentObserveronChange 方法中以该接收器为目标发送广播。

    扩展 ContentObserver

    更多信息请见here

    【讨论】:

    • 好的,我尝试实现它。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-15
    • 1970-01-01
    • 2011-05-19
    相关资源
    最近更新 更多