How to Show Alert Messages

Does Garmin have technique envisioned for how to show pop up alert message strings?

I'm thinking of alerts like on by 310. When I press start, it pops up "Timer Started" for about 2 seconds on top of whatever view I'm in. When there is a heart rate alert, it pops up "Heart Rate Too High". The heart rate alert will even pop up if I'm inside a menu.

Does Garmin intend to offer a widget for this when the audible and vibrate alerts are added or is this a feature that needs to be coded up on our own?
  • Former Member
    Former Member over 8 years ago
    OK thanks,

    as it didn't work for me, I finally implement a test in my actual onupdate(dc) method. it's less pratictal, but it works anyway.
    Rgds
  • To be clear, I know this code used to work just fine, but I haven't tested it since I wrote it originally. I'll take some time tonight to verify it works.

    Travis
  • It looks like there have been a few changes in behavior. I've updated the original post above so that the code works. I'm also going to be filing bugs for the issues that this code exposed.

    Travis
  • Former Member
    Former Member over 8 years ago
    Thanks Travis,
    I'll test it ...

    This code
    alert.pushView(Ui.SLIDE_IMMEDIATE);


    speaks more to me than only the

    new Alert({
    :timeout => 2000,
    :font => Gfx.FONT_MEDIUM,
    :text => "Quick Brown Fox",
    :fgcolor => Gfx.COLOR_RED,
    :bgcolor => Gfx.COLOR_WHITE
    });
  • Former Member
    Former Member over 8 years ago
    ok, it works, but I have an another question, even this is not really directly linked to this.
    You Alert view, I wanted to use it in different way : for a lap for example (this works perfectly as I want) , but for finishing the app : after the 'save' button, I want to use it for showing 'Activity saved" and come back to the app menus (or to the watch face directly)

    When I do that, , I try to put Ui.popView after the alert.pushView : in simulator the the popView is launched to fast (the alert isn't even shown), and in the watch : the alert view is shown , and I'm back to the menu 'save/resume/discard'

    any idea to do that ?
  • If you are in a menu, and the user has picked one of the menu items, you should be able to pop the menu first (with Ui.popView()), and then push the alert view onto the view stack afterward.