I followed this example:
```using Toybox.Sensor; function initialize() { Sensor.setEnabledSensors([Sensor.SENSOR_HEARTRATE]); Sensor.enableSensorEvents(method(:onSensor)); } function onSensor(sensorInfo) { System.println("Heart Rate: " + sensorInfo.heartRate); }```
to also display temperature data (Sensor.SENSOR_TEMPERATURE). It works on the simulator, but when I load it on my vivoactive hr, it doesn't work - no temperature information returned in sensorInfo. I think the temperature works on the watch overall, because I can get it from SensorHistory, but not through sensor events as described above.
Any ideas?
Thank you
It's a widget with:
<iq:products>
<iq:product id="vivoactive_hr"/>
</iq:products>
<iq:permissions>
<iq:uses-permission id="Background"/>
<iq:uses-permission id="Positioning"/>
<iq:uses-permission id="Sensor"/>
<iq:uses-permission id="SensorHistory"/>
</iq:permissions>