I would like use greenDao with a loader <cursor> to load asynchronously my data from the DB. I found example using loader with a contentProvider. I know that loaders are the best way to load data from a database because it handle the lifecycle of the cursor, auto update the cursor when we add a value.. Unfortunately there is no example of loader with greenDao, is it possible or I have to use a contentProvider??
Thx
I came across this question since i was also have the same question, but I have an idea but have never tried it yet but you can maybe execute it faster and better than me. I think eventbus(https://github.com/greenrobot/EventBus) can be a solution, whenever there is a change in the local database (add,delete,update) you can notify an event, and in your activity you should have an event listener that will trigger content reload(re-query again) upon receiving the event.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With