Thanks Mark. I absolutely need it for tracking changes over time. I was wondering whether it would be realistic to attempt to implement something using the usual (ancient?) approach of using
ContentProvider.notifyChange()
m
Mark Murphy
02/03/2021, 2:19 PM
I'm uncertain where the
ContentProvider
is coming from. Regardless, if you want to go through the headache of ensuring that you emit updates manually, then you could try a
SharedFlow
both as a return value from your function and to hold onto in your repository (or whatever is doing the SQL calls). The repository would then need smarts in all of its other CRUD functions that if it is doing something that affects the results of your
Flow
-based query, you execute some code that fires a fresh query result into that
SharedFlow
.
To be honest, I'm not really certain what this is buying you over
@RawQuery
, though.
m
Mark
02/03/2021, 2:27 PM
My aim is to drop Room from my dependencies, and I’m trying to work out if that is feasible given I need to have several queries return as
Flow
i
Ian Lake
02/03/2021, 3:16 PM
I think you underestimate how much Room is doing for you