GreenDao - Android - How to listen to DB change using GreenDao

313 Views Asked by At

I'm using GreenDao 3 and I'd like to know what is the URI to be used to listen to DB changes. I'm using this code:

Uri uri = Uri.parse("content://" + BuildConfig.APPLICATION_ID + "/table1");
getContext().getContentResolver().registerContentObserver(uri, false, mObserver);

However, after an insert/updated or some change on table1, nothing happen at onChange method on mObserver variable.

Am I doing something wrong? Is the URI wrong? What should I do to make it work?

Thanks

0

There are 0 best solutions below