jk_qq jk_qq - 25 days ago 5
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

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.