Pressing buttons in simulator

Former Member
Former Member
I am new to this so sorry if this is a basic question.
How do I press buttons in the Connect IQ Device Simulator?
I am trying to write a simple program for my Forerunner 920xt.
Thanks
  • If the menu button still isn't working for you it is most likely because you aren't holding the button down long enough. Some devices overload the buttons and holding the button has one behavior while just pressing it has another.

    Travis

    Thanks, indeed my click was to short.
  • Now my problem is this code work in the simulator, but on the Forerunner 920xt, pressing the Back button takes me back to the clock.

    I'm guessing that you are building a widget. If this is the case, you need to push a new view onto the view stack to be able to fully handle user input. If the back button is pressed while a widget is on screen, the page loop will consume that input and send you back to the watch face. This is covered in the UXGuide that ships with the SDK.

    Travis
  • Can I click the Menu (Settings) button on Watch Face? I want to test Menu2 for changing settings from the watch? And where should I click exactly? I am attaching a screenshot with the button marked by red rectangle. Do I need to click inside that red rectangle or somewhere else?

  • Or how to test Watch Face Custom settings menu on Simulator?

  • To get to on-device watch face settings on a real watch, you don't do it while the watchface is being used normally.  What you want to do is long press the middle left button on a 5 button device, and go to "Watch Face".  There you can move thru the installed watch faces.  When you are on the one you want, press the upper right button, and you'll see Apply and Customize.  For settings, pick customize.  On things like a venu with 2 buttons, long press the lower left button, then Watch Face, scroll to the one you want, then tap on the pencil at the bottom to get to settings..

    In the sim to test on device settings for a watch face, go to Settings>Trigger App Settings

  • Yes, this is exactly what I need! Thanks a lot!!!

  • I'm trying to test this with the SDK example of Menu2. Trigger App Settings is greyed out for me in the sim. Any ideas? I'm using that latest stable sdk with the product set to Venu2. Thanks.

  • The menu2 sample in the SDK is a device app and doesn't have on-device settings (you can only do that with watch faces and data fields.)

    If you want to use regular app-settings (from a phone or Garmin Express) you can test it in the sim with File>Edit Persistent Storage>Edit Applications.Properties data

    The  Analog watch face sample in the SDK shows both, as does a sample watch face I posted a while back:

    https://forums.garmin.com/developer/connect-iq/f/discussion/349473/simple-example-wf-that-shows-a-bunch-of-things

    (colors are set with app-settings, leading zero, with on device settings)

    Also, on-devices settings are not available with all devices but I do see them on the venu2

  • Nice, thanks :) I'll check out your example.

    It's a bit confusing for someone starting out with settings. Am I correct in saying that the on-device menu / settings can't or doesn't write to the regular app settings that can be changed via CIQ?

  • It depends on how you write things.  on-device settings can change things in Application.Properties, so they show the same with app-settings (but you won't see onSettingsChanged).  I tend to use Application.Storage for on-device settings

    That sample I posted shows a whole bunch of things like vector fonts, a background service, complications, on-device settings, app settings, how to handle wheel-chair mode on the venu3 and va5.  All in about 14k at runtime