Can't hear Attention.playTone on fenix6 / simulator

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)

  • make sure it's the same linux he's using, as the different flavors, and even different versions of the same flavor can act differently

    Well since I don't know what distro Gavriel is using, and I'm just doing this to satisfy my own curiosity and attempt to help in a very small way, I'll just stick with Ubuntu for now if that's ok with you.

    For example, if CIQ fails to play audio in whatever version of Ubuntu I test with, it's further anecdotal evidence that CIQ has an issue with linux audio. If it doesn't fail, then it doesn't prove anything either way. But the same could be said if I use the exact same distro as Gavriel and CIQ plays audio.

    You're welcome to test with Gavriel's exact distro and version yourself.

    There was just a whole thread about apple releasing a new version and if anyone has tried it,

    That's very different for many obvious reasons, but it doesn't seem relevant either way.

  • I have Ubuntu 22.04

    I called alert() from the view's constructor but that is being called from the app's constructor:

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

  • And I also added a call to alert() from onTimerStart(), and still no sound, so it's not because the Tone is only on in the simulator when in an activity IMHO

  • And I also added a call to alert() from onTimerStart(), and still no sound, so it's not because the Tone is only on in the simulator when in an activity IMHO

    Yeah that makes sense.

    I just installed Ubuntu 22.04 LTS in a virtualbox VM (host OS = Win11). Other details:

    - CIQ 4.1.5

    - device = fenix7x (the other devices are still loading in the SDK manager as I post this...)

    - java = openjdk-11-jre (yeah, I know adoptium is preferred now, but I couldn't be bothered to jump through all the hoops to install it properly :/)

    I'm seeing the same thing as you where tones are not playing. (Other audio plays fine, including ubuntu system sounds and youtube videos). I tried calling alert() in both View.initialize() and View.compute() (it's a simple data field.)

    The code works otherwise in the sense that it doesn't crash and the watch visibly vibrates in the sim.

    I also tried openjdk-17-jre, but as expected, it made no difference.

    Maybe it's worth opening a bug report for this. I'll def vote for it and add my details.