Android SQLite DB notifications

前端 未结 3 734
梦谈多话
梦谈多话 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条回答
  •  猫巷女王i
    2020-12-15 22:51

    SQLite provides Data Change Notification Callbacks. I don't think that Android exposes them directly but it does have for example CursorAdapter which provides some change notifications.

    As thinksteep asked however, do you expect your DB to be changed outside the scope of your own application?

提交回复
热议问题