Quantifying User Information

Garmin devices collect and quantify numerous metrics about the user1. Connect IQ exposes many of the collected metrics so they can be incorporated into your solutions.

The Toybox.ActivityMonitor and Toybox.SensorHistory modules allow apps to access the activity tracking, wellness features, and historical sensor information of Garmin wearable devices.

User Profile

The Toybox.UserProfile provides access to personal information about the user, including their gender, birth year, height, weight, and athletic metrics like VO2 Max and activity class. It requires the UserProfile permission to access.

The UserProfile.getProfile() call returns a UserProfile.Profile object, which provides

MetricAPIValueAPI Level
Activity ClassProfile.activityClassA quantification of how active the user from 0 to 1001.0.0
Average Resting Heart RateProfile.averageRestingHeartRateThe user's seven day average resting heart rate (bpm)3.2.0
Biological SexProfile.genderThe user's biological gender1.0.0
Birth YearProfile.birthYearThe year the user was born1.0.0
Cycling VO2 MaxProfile.vo2maxCyclingThe user's VO2 Max value for a cycling activity3.3.0
HeightProfile.heightThe user's height in centimeters (cm)1.0.0
Resting Heart RateProfile.restingHeartRateThe user's current resting heart rate in beats per minute (bpm)1.0.0
Running Step LengthProfile.runningStepLengthThe user's running step length in millimeters (mm)1.0.0
Running VO2 MaxProfile.vo2maxRunningThe user's VO2 Max value for a running activity3.3.0
Sleep TimeProfile.sleepTimeTypical sleep time as configured by the user1.0.0
Wake TimeProfile.wakeTimeTypical wake time as configured by the user1.0.0

Toybox.UserProfile provides access to the additional data:

InformationAPIValueAPI Level
Activity HistoryUserProfile.getUserActivityHistory()Record of the activities the user has done3.3.0
Heart Rate ZonesUserProfile.getHeartRateZones()The user's defined heart rate zones for running, cycling, or swimming1.2.6

Activity Monitoring

Toybox.ActivityMonitor provides access to the current day's metrics via ActivityMonitor.getInfo() which returns a ActivityMonitor.Info object.

You can also get a daily history of some of these metrics with ActivityMonitor.getHistory() which returns an array of ActivityMonitor.History objects. How far back this history goes can vary by device as well as how long the device has been turned on, but a seven day history is fairly typical.

MetricAPIValueAPI Level
Calories BurnedInfo.calories, History.caloriesThe calories burned so far for the current day in kilocalories (kCal)1.0.0
Daily Active MinutesInfo.activeMinutesDay, History.activeMinutesThe number of active minutes for the current day2.1.0
Distance Traveled2Info.distance, History.distanceThe distance traveled since midnight of the current day in centimeters (cm)1.0.0
Floors ClimbedInfo.floorsClimbed, History.floorsClimbedThe number of floors climbed for the current day2.1.0
Floors Climbed GoalInfo.floorsClimbedGoal, History.floorsClimbedGoalThe goal the user has set for the number of floors climbed in a day2.1.0
Floors DescendedInfo.floorsDescended, History.floorsDescendedThe number of floors descended for the current day2.1.0
Meters ClimbedInfo.metersClimbedThe vertical distance of floors climbed in meters (m)2.1.0
Meters DescendedInfo.metersDescendedThe vertical distance of floors descended in meters (m)2.1.0
Move Bar LevelInfo.moveBarLevelThe current level of the move bar between MOVE_BAR_LEVEL_MIN and MOVE_BAR_LEVEL_MAX1.0.0
Respiration RateInfo.respirationRateCurrent respiration rate for the user, in breaths per minute3.3.0
StepsInfo.steps, History.stepsThe step count since midnight of the current day in number of steps1.0.0
Step GoalInfo.stepGoal, History.stepGoalThe step goal for the current day in number of steps1.0.0
StressInfo.stressScoreThe current stress score based on the last 30 seconds5.0.0
Time to RecoveryInfo.timeToRecoveryTime to recovery from the last activity, in hours3.3.0
Weekly Active MinutesInfo.activeMinutesWeekThe number of active minutes for the current week2.1.0
Weekly Active Minutes GoalInfo.activeMinutesWeekGoalThe user's goal number of weekly active minutes2.1.0
Wheelchair PushesInfo.pushesThe user's number of wheelchair pushes4.2.0
Wheelchair Pushes GoalThe user's goal number of wheelchair pushes4.2.0

When wheelchair mode is enabled, ActivityMonitor.Info will have zeroes for Info.steps, Info.stepGoal, Info.floorsClimbed, Info.floorsDescended and Info.floorsClimbedGoal and will instead have values in Info.pushes and .

Sensor History

Since API level 2.1.0

The Toybox.SensorHistory module allows the app to access saved sensor history on the device. Data from sensors can be accessed by getting an iterator.

FunctionPurposeAPI Level
SensorHistory.getBodyBatteryHistory()Get the user's body battery samples as recorded over the previous hours on the device. This does not have access to synced data.3.3.0
SensorHistory.getHeartRateHistory()Get the user's heart rate samples as recorded over the previous hours on the device. This does not have access to synced data.2.1.0
SensorHistory.getTemperatureHistory()Get the temperature as recorded over the previous hours on the device. This does not have access to synced data.2.1.0
SensorHistory.getPressureHistory()Get the barometric pressure as recorded over the previous hours on the device. This does not have access to synced data.2.1.0
SensorHistory.getElevationHistory()Get the distance from sea level as recorded over the previous hours on the device. This does not have access to synced data.2.1.0
SensorHistory.getOxygenSaturationHistory()Get the user's SpO2 as recorded over the previous hours on the device. This does not have access to synced data. Depends on if user has enabled MO2 recording.3.2.0
SensorHistory.getStressHistory()Get the user's stress as recorded over the previous hours on the device. This does not have access to synced data.3.3.0

Not all Toybox.SensorHistory types are available on all devices. Capabilities should be validated using the has operator. The get functions will return a SensorHistory.SensorHistoryIterator type.

Calling the SensorHistoryIterator.next() function will iterate through the history values until the end of the data is reached. When there is no more data the iterator will return null. There are no guarantees on the sample interval or that the requested range will be available.

This function returns a SensorHistory.SensorSample object. The iterator can be adjusted to provide the newest data values first or the oldest values first by using the enumeration values ORDER_NEWEST_FIRST and ORDER_OLDEST_FIRST.

1 Number 6's argument of "I am not a number, I am a free man!" never met Garmin Connect
2 🎵 ...and I would walk five hundred miles / and I would walk five hundred more / just to be the man who walks a thousand miles / and beats my Connect step challenge 🎵