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
Implement API for activity fetching #2889
Conversation
Thanks! Sorry about the duplication - I'd started the work on this and then didn't get around to doing the Bangle.js bit before my holiday :) Do you think maybe it makes sense for |
@gfwilliams I was trying to avoid computing the timestamp of the current health record for every record, but I can maybe try and do that in an efficient manner. The idea of this function was really to have a more optimized function for the sync functionality, since people can use it periodically. |
Ahh, ok - I see, we don't create a I don't think speed will be an issue here - the thing slowing us down will be bluetooth transmission speed :) |
0731edc
to
917434e
Compare
Thanks for sorting that so quickly - merging now! |
Since metadata says Solution is either:
|
just done I hope! |
Ooops, I thought the minified files were automatically generated when deploying this 😐 |
Now it works - super nice! :) @joserebelo The fetching would never be stopped when |
Well usually when you specify an unminified JS it gets minified on the fly. I can't remember why but for some reason it was decided that those files should be minified offline (we use the closure compiler then and it often does a better job) |
Yup - we only stop it once the Bangle signals that it finished. If that message never arrives, it never stops. It's a more or less known issue, there used to be a similar problem in Huami devices. I think we may want to eventually introduce a timeout on the Gadgetbridge side for operations that become stuck. |
Add a simple API for ativify fetching from Gadgetbridge. The API receives the start timestamp, and returns activity up until the current timestamp.
PR on Gadgetbridge: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3212
Not incredibly happy with the code, but I am trying to avoid iterating through entire months needlessly, since sync might happen periodically.
Still very much a WIP.
Fixes #718