jk_qq jk_qq - 1 year ago 125
Android Question

how to listen for SQLite database changes in android

I'm using SQLite database in android and want to listening for any database changes. How can I do this?

Thanks for all future help!

Answer Source

SQLite doesn't offer any change listener functionality; you have to monitor it yourself. The simplest way to achieve this would be to send a Broadcast (or even better, a LocalBroadcast) anytime you modify the database. Some of the database libraries already offer functionality that is similar to this - check out GreenDAO.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download