Android SQLite DB notifications

前端 未结 3 735
梦谈多话
梦谈多话 2020-12-15 21:47

I am writing an Android app that needs to be notified whenever a given SQLite database changes (any new row added, deleted or updated).

Is there any programmatic wa

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-15 22:39

    You can register an observer class such as DataSetObserver

    Then whenever you change something you can call cursor.registerDataSetObserver(..) to register observe changes.

    It's not well documented but I'm sure that there are some examples out there

提交回复
热议问题