What is the best PHP SDK to use to access the Garmin Health data?
What is the best PHP SDK to use to access the Garmin Health data?
Ok great. I have the access with key + secret. For start I would be interested to see some example how to retrieve some health data, e.g. number of steps, heart rate, etc? Thank you.
You have to first set up an appropriate API endpoint, then obtain authorisation from a user to share their Health data, and then monitor the endpoint for the relevant data feed. It's all in the API docs.
My endpoint receives Activity data as a FIT file which I decode for track details and lap data that I have customised in my CIQ watch app to record events that are of interest: I don't access steps, heart rate etc, so can't advise on that area.
hi there.
I have implemented a server in php that is used live for my app ConnectStats and both are open sourced, you can find the code here
https://github.com/roznet/connectstats_server
Hopefully this can help.
The server is definitely working fine and running live for the app. it currently processes thousands of push from garmin every day, so may not scale to millions but should get you started.
I see you are using adriangibbons php fit parser (https://github.com/adriangibbons/php-fit-file-analysis)
I'm using it too, and it works fine in 90% of fit files. Anyway, it doen't works at all in two cases:
- multisport activities (like triathlon)
- some sporadic case of single activities with a "strange" node structure.
Do you have noticed/corrected these issues for your app?
Can you help me?
I actually only use php-fit-file-analysis for doing a quick extract on the server of the main info of the file but the full real parsing is done on the phone/client using https://github.com/roznet/FitFileParser in c/swift and that works fine for multi activities.
On the server I just extract some info, so the client can receive key statistics before downloading the files, but if it fails, it's not really an issue because the main parser will extract it later on the phone, the user will just not see a preview until that happens.