Acknowledged
over 1 year ago

Allow to record the data from device temperature sensor for custom apps

Hi, I'm developing a watch application that records an activity, and one of the metrics that has to be recorded is the temperature from the device sensor. In my Forerunner 745 everything works fine and the temperature is recorded by default with ActivityRecording.createSession.

session = ActivityRecording.createSession({
    :name => "My activity name",
    :sport => ActivityRecording.SPORT_GENERIC,
    :subSport => ActivityRecording.SUB_SPORT_GENERIC
});

But when I run an app on my Fenix 7 Pro, the temperature is not saved to the activity, and when I open it in Garmin Connect I do see only the heart rate and some of the other default metrics.

I've tried to use both, adding :sensorLogger to the createSession with enabled all of the sensors, and tried to use Sensor.setEnabledSensors([Sensor.SENSOR_TEMPERATURE]), but none of those worked for me, since those methods seems to be related for external sensors only (e.g. Tempe). However during the activity the temperature is available and received through SensorHistory.getTemperatureHistory({ :period => 1 });

Can you please advise either it is a bug that there is no way to record the device temperature sensor metrics to the session out of the box? If that's the expected behavior, can I request a feature to allow to record the temperature? For now I'm writing the temperature using getTemperatureHistory to my custom field, but that method does not update the value so frequently as it would be native one (compared on Forerunner 745 where it works)

Thanks

Also, you can find more details in the following discussion:

https://forums.garmin.com/developer/connect-iq/f/discussion/375753/temperature-is-not-saved-to-the-activity