Sensor.info vs. Activity.getActivityInfo

For activity.recordings / session creation and usage of Sensors (eg: GPS/HR/Footpod) etc

in the API, I see 2 different pages and in some cases, duplicate (?) readings. Or perhaps it's just me being confused.

Sensor-Info
http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Sensor/Info.html

Activity-Info
http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Activity/Info.html


eg: For HR
if( sensor_info.heartRate != null ) { HR = sensor_info.heartRate.format("%d");}
http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Sensor/Info.html#heartRate-instance_method

if( Act.getActivityInfo().currentHeartRate != null ) { HR = Act.getActivityInfo().currentHeartRate.format("%d")
http://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Activity/Info.html#currentHeartRate-instance_method

Both of them seems to provide the same (?) data set.

Which should I use?
Or.... is the sensor one for external sensors and the other one, getActivityInfo() are all Internal sensors?
  • got my answer using a test case involving GPS / Footpod / accelerometer.
  • Former Member
    Former Member over 10 years ago
    Some of the data in the modules overlaps. The Activity Info module is primarily intended for use in data fields, but there are uses for it in other app types, especially when recording FIT sessions in a Watch App.

    The Sensor module includes only data from internal and external sensors, and does not contain any activity specific data.