I am developing on Ubuntu 22.04, using VSC. I tried the following both using SDK 4.1.5 and 4.2.0 Beta 1 with similar result.
Attention.playTone(Attention.TONE_LOUD_BEEP);
does not make any sound in the simulator. (Tones are enabled in the simulator settings) The same code does make a sound in real fenix6.
See more details: https://forums.garmin.com/developer/connect-iq/f/discussion/314057/can-t-hear-attention-playtone-on-fenix6-simulator
Here's an example snippet from my datafield:
class MyApp extends Application.AppBase { var mField; function initialize() { mField = new MyField(); } public function getInitialView() { return [ mField ] as Array<View>; } } class MyField extends WatchUi.DataField { function initialize() { alert(); } hidden function alert() as Void { if (Attention has :playTone) { log("HR alert tone"); Attention.playTone(Attention.TONE_LOUD_BEEP); } if (Attention has :vibrate) { log("HR alert vibe"); var vibeData = [ new Attention.VibeProfile(50, 1000), // On for one second ] as Array<VibeProfile>; Attention.vibrate(vibeData); } } }