Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow does not notify when data changes #4

Closed
raheemadamboev opened this issue Mar 18, 2022 · 9 comments
Closed

Flow does not notify when data changes #4

raheemadamboev opened this issue Mar 18, 2022 · 9 comments

Comments

@raheemadamboev
Copy link

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?

@evilthreads669966
Copy link
Owner

I'm not sure

@evilthreads669966
Copy link
Owner

I will let you know shortly

@evilthreads669966
Copy link
Owner

evilthreads669966 commented Oct 12, 2022

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

@evilthreads669966
Copy link
Owner

This is a content provider library as stated in the libraries description

@evilthreads669966
Copy link
Owner

Flowing from a content provider is more for using algorithms.

@evilthreads669966
Copy link
Owner

This isn't a bug.

@evilthreads669966
Copy link
Owner

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.

@evilthreads669966
Copy link
Owner

I spoke too much. But you want content observer feature added to the library. noted.

@evilthreads669966
Copy link
Owner

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.

@evilthreads669966 evilthreads669966 added question Further information is requested and removed question Further information is requested labels Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants