Under Review
over 2 years ago

bug: Attention.playTone dosn't play any sound in the simulator in Linux

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);
        }
    }
}

Parents
  • I saw the same thing with:

    - Ubuntu 22.04 LTS in a virtualbox VM (host OS = Win11)

    - CIQ 4.1.5

    - device = fenix7x

    - java = openjdk-11-jre and openjdk-17-jre

    Audio outside of the CIQ simulator plays fine (e.g. Ubuntu system sounds, youtube videos)

Comment
  • I saw the same thing with:

    - Ubuntu 22.04 LTS in a virtualbox VM (host OS = Win11)

    - CIQ 4.1.5

    - device = fenix7x

    - java = openjdk-11-jre and openjdk-17-jre

    Audio outside of the CIQ simulator plays fine (e.g. Ubuntu system sounds, youtube videos)

Children
No Data