I have the following scenario.
- Sensor generates data every 30 seconds.
- Update sensor data on FireStore document.
- Mobile app shows the sensor data in realtime.
One problem with above steps is that lot of data writes takes place, which increases billing. I want to optimize it by changing step 2.
- Update sensor data on FireStore document only if mobile app is listening to realtime updates
To do this optimisation I need a way to know if app is listening to realtime update. So is there a FireStore event/callback fired when app starts/stops to listen to realtime update.