I'm trying to add alerts to my datafield. When it'll be ready it'll alert (play a tone / vibrate) when the HR gets too high. For now I just wanted to test my code, so I call the following function from the constructor of the datafield:
hidden function alert() as Void {
if (Attention has :playTone) {
logAlways("HR alert tone");
Attention.playTone(Attention.TONE_LOUD_BEEP);
}
if (Attention has :vibrate) {
logAlways("HR alert vibe");
var vibeData = [
new Attention.VibeProfile(50, 1000), // On for one second
] as Array<VibeProfile>;
Attention.vibrate(vibeData);
}
}
It does vibrate but I can't hear any tone. I tried also Attention.TONE_ALERT_HI. And I also tried commenting out the vibration (maybe it cancels the tone?) but no tone at all :(
Any idea why I can't hear the tone on fenix 6?
BTW I also don't hear any tone in the simulator (which I guess probably also should be audible, because I do "see" the vibration)