Open subiol opened 7 years ago
Thanks for the input!
Adding Websockets with those caveats can be a good enhancement. Actually, it would be aligned with our goals for version 0.8.0 0.9.0 - Total control over your data budget and battery lifespan, specially #134.
Though, as you point out, Websockets are bandwidth and power hungry, and that is not compatible with a mobile environment. Your suggestion to only enable them when using a WiFi connection takes care of the excessive bandwidth, but we are still left with the power issue. Keeping an always on Websocket connection would require Boilr to acquire a permanent CPU wake lock. Something like that would be considered an utter bad practice. It would drain you battery real quick. The only sane way I see is to add another requirement to enable Websockets: plugged to the wall (charging)*.
@subiol Do you keep your device plugged when at home/office? That is what I usually do. If others use it like that then Websockets seem more viable.
*Sure we can place a button somewhere to allow Websocket connections without being plugged. Though that button must carry some heavy warnings.
I do not necessarely have the phone plugged all the time. Mostly, but not always. Although having the option to switch off the plugged disconnection works fine by me. More options specially if they do not clutter the gui is always good.
Add websockets option to check the price, so people can chose for the app to check the price instantly (websockets) or every certain interval (API).
To avoid using too much bandwith or battery when "on the road" it would help to have the option to connect throught websockets only when connected to wifi and automatically switch to api if the wifi disconnects.