RunKeeper‘s (@runkeeper) recently announced integration with MyFitnessPal enables users to connect their accounts on the two systems to automatically sync MyFitnessPal tracked calories consumed (i.e. calories added) into RunKeeper while also syncing RunKeeper tracked fitness activities (calories subtracted) into MyFitnessPal. Weight measurements are also synchronized bidirectionally between the two systems so that your latest weight is consistent between the two.
But there’s an added bonus for other RunKeeper partners and members of the Health Graph community. Both calories consumed and weight measurements synchronized from MyFitnessPal to RunKeeper are available to all Health Graph API developers. Calories appear as
Nutrition sets with values in the
calories field and weight measurements appear in
Weight sets. Both of these nutrition and weight sets will have a
source value of ‘
MyFitnessPal‘ to indicate their origin.
We hope that access to the additional MyFitnessPal-originated data will help you build even more amazing things for our collective user community!
One question we receive fairly often from Health Graph (@healthgraphapi) partners is how to validate that fitness activities (runs, walks, bike rides, etc.) read out of the Health Graph platform were GPS-tracked versus manually entered by the user. Rewards partners a la Earndit and GymPact, corporate wellness providers like Virgin HealthMiles, and forward-thinking brands are often keen to differentiate between tracked versus manually entered activities as part of their programs’ anti-fraud efforts.
So how do you tell the difference between GPS and manual activities?
Each item in the Fitness Activity feed has ‘
entry_mode‘, and ‘
has_path‘ fields. These let you determine whether the activity was originally submitted as a GPS-tracked activity. For example, a RunKeeper (@runkeeper) mobile app GPS-tracked run should have values of “
API“, and “
true” for the aforementioned fields, respectively.
If you are interested in including GPS-tracked sources from other Health Graph partners’ activity trackers, you can include them in your ‘
source‘ filtering. In addition, if you need to differentiate by type of activity (i.e. running, walking, cycling, etc.) you can use the ‘
Using these fields should let you skip any activities for which the user simply entered statistics, or originally entered the route map (path) via the Web. For more details on these fields and their usage, please refer to the Health Graph fitness activities documentation, especially the array structures section.
Caveat: The only reliable way to verify whether a user has subsequently edited the map associated with a saved GPS-tracked activity is to manually check each point’s ‘
type‘ (a value of “
manual” means it has been edited). For efficiency’s sake, we don’t save that information anywhere else in the Health Graph platform and we retrieve points only when full data for the activity is requested. That said, we have found that most users do not edit maps after the fact.
Recently added fields include:
source– string added to Fitness Activities, Background Activities, Nutrition, Sleep, Diabetes Measurements, and Weight portions of the Health Graph API; this provides the name of the application that last modified the given activity or measurement; see documentation for details.
is_live– boolean added to Fitness Activities to indicate whether the activity is currently being tracked via RunKeeper Live; note that this field will report ‘
false‘ until at least one GPS point for the Live activity is received (this should occur immediately upon beginning the Live activity, but may be delayed up to several seconds if it takes longer than normal for GPS hardware to acquire a sufficient GPS signal).
userID– integer added to each team member entry from Street Team
GET /teamresponse to allow developers to more easily access team member account details (assuming member has authorized the calling app).
- past activities are now available in a summary form that is more conducive to bandwidth-constrained environments; search for ‘summary’ in the Fitness Activities docs to learn more.
- blood markers – a number of additional markers have been added to the General Measurements portion of the Health Graph API; for the complete list of what’s now available, please refer to documentation for General Measurements and Diabetes portions of the API.