Pickpocket
Pickpocket copied to clipboard
Flow does not notify when data changes
In my case, I'm using calendarFlow() and observing for calendar events. If I insert new event from calendar, it does not notify new changes.
How can I solve it?
I'm not sure
I will let you know shortly
I don't think that you can flow off of a content provider. You can flow off of a room database table. It's not going to give you that,. You need a Content Observer. I'll make you a content observer library. Content Providers are also a SQLITE table as well. The proper way to do it is to query all from the content provider then you set a Content Observer on the same table and add new ones to your collection.
@raheemadamboev
This is a content provider library as stated in the libraries description
Flowing from a content provider is more for using algorithms.
This isn't a bug.
So you would still use my library to do this. You use Pickpocket to get the current events and then you set a content observer on the database table.
I spoke too much. But you want content observer feature added to the library. noted.
also ContentObserver is best implemented as an inner class that has context that way you have access to the android context if you need it.