In a watchface I created which ConnectIQ (4.30) I can show the clocktime, but when I try to show the heartrate I get the error
Details: Module 'Toybox.Sensor' not available to 'Watch Face'
Stack: - onStart() at /Users/…/source/_garmin_projectAPP.mc:13 0x10000095 Permission Required
In the manifest I added all available permissions, I also imported the Sensor with
using Toybox.Sensor
I am also not sure where exactly to enable the heartrate-sensor with e.g.
Sensor.setEnabledSensors([Sensor.SENSOR_HEARTRATE]);
Sensor.enableSensorEvents(method(:onSensor));
I tried in the initialize()
and onStart(state)
method, but still I get the error shown above.