More Basic Watch App Mysteries

My starting point is as before.... create a basic watch app in Eclipse, using the wizards.
I don't change anything.
I build the app.... with the timeout change, the build now succeeds.
I run the app in the simulator on the Vivoactive HR simulation.
The app that is created presents a graphic of a monkey.
When I hold down the right button a 2 item menu is presented.
If I select Item 1, a message appears in the debug log window indicating that Item 1 was selected.
If I select Item 2, no message appears, though the code indicates that it should.
Instead, the menu shifts up, centering the Item 2 menu item text.

I see no code in the example that causes this behavior
The documentation for the Menu support in the UI does not describe this behavior, or how to control it, though it shows exactly the code that I'm seeing in the project that was created.

I also attempted to use the debugger to follow the code and see what's going on.
The onMenuItem() function is not entered when I select Item 2.

So.... what's happening here, and is it possible to create a menu that does not behave in this way ?
The API documentation for menu, and menuInputDelegate do not describe this behavior.
Is there documentation that describes what to expect from the underlying menu handler ?
I see a parameter called ui.SLIDE_UP that looks suspicious, but it is passed to pushView() so I suspect (though the documentation does not verify) that this applies to how the view is presented over the previous view.


Also....
The debugger does hit the break point that I set inside onMenuItem(), but once the break point is hit, and I attempt to get the code to continue to run, the app in the simulation no longer responds to any button or menu selection.

I hope there's a way to use the debugger to hit a break point, walk through the code, and continue to run until another break point is hit.
  • Jeff, are you talking in the sim or on the vahr itself? As I said, menus in the sim are different, in that they really a single generic version for all devices. CIQ menus on the vahr are like those used in native apps on the vahr and you just tap the item you want, without it being centered or anything else, and you use swipes if the item you want isn't visible. Do you have the va-hr or are you still waiting to get it?

    And yes, as Coleman said, I can attest to how much better the docs and examples have gotten since CIQ started! :)
  • This is one of the top reviews in my App. "I cannot select ...". All of them are Vivoactive HR users, because you have to center the menu-entry first, to select it.


    Are you using the standard CIQ menu system? Because they don't have to be centered on the vahr. You just tap on the item you want. On my "Resume/Save/Discard menus, "resume it at the top right under the menu title, you just tap it. Discard is at the bottom, and you just tap it... The only devices that need centering are non-touch, where you use the up/down keys to move an item to the center and the press the start/select button.

  • To Jim.....
    So far I've only tried running the example code in the simulator.
    Given my experiences so far.... builds that don't work for building the sample apps, a build that doesn't work when you use the wizard to start a generic app, and some mystery about how the menu code works, I'm not expecting something like side loading to be a process that comes together and works as expected without a whole lot of time expended on this forum to find out why it doesn't work as expected.

    It now sounds like the behavior that the simulator provides isn't what I can expect to see on the device.
    Is that the situation ?
  • It's a simulator, and not an emulator (One of the Garmin folks first said that years ago), but it's getting closer. Menus are actually one of the few things that don't act/look the same, and to me, that's actually kind of minor, as they look like they should on the device itself. That's a given. If you don't have a device, when you do, load a few things from the store to see how things can be done. Then sideload a couple samples, or something built from one of the templates (file>new>Ciq project in Eclipse). (sideloading is REALLY simple. All you're really doing is copying a .prg to the \garmin\apps directory on the watch. There's a wizard for that so you can sideload a debug or release version of the .prg.

    True story here. When the original va was announced, I preordered it, and downloaded the CIQ SDK (a very early one!). I had a watch face and a widget ready to go the day I got the va. And neither worked! Turns out I'd missed something that the simulator didn't check for at that time in the watch face (the simulator does check for that kind of thing today), and it crashed. With the widget, I didn't know that widgets timed out on the watch, and with GPS/Comm, etc, the widget ran too long and would time out before it had data. But once I saw the watch, and saw a few things, I better understood how to do things in the sim (comm in the sim is MUCH faster than over BLE on a watch). After spending a short time with the watch, the simulator and how to do things became much clearer.
  • Thanks Jim.
    I'll give side-loading a try.
  • You can try it if you don't have a watch... If you're on windows, just create c:\garmin\apps. and try with that. With a real device connected, just change C: to the drive for your watch.
  • Hey Jim,
    Side loading was painless, the menu works in a sensible way on the device, and I'm seeing text in the log file from debugging statements.
    Is there some way to do this process without unplugging and replugging the device from the USB connection ?
    At present I connect the device to my computer via USB, load the app, create the matching text file for logging, unplug the device, run the app, terminate the app, plug the device back into the USB connection & look at the log file.
    Is that the process that you use ?
    Thanks
  • That's the exact process I use. But I usually hold off on the log file <myapp>.txt unless I'm looking for something specific, and before release, remove the Sys.println() calls that would write to that file. I often just display something in a free part of the display if debugging on the watch vs writing it out. Then just a nw sideload if I see a bug. No need to check a log file.
  • There is a bit of a learning curve with CIQ, but seeing things on an actual watch, does really help.

    Today, there are well over 1000 (maybe 2000 by now) people doing CIQ apps (more than 100 of us made it to CIQSummit17 in April) There are folks here that have had their apps downloaded many thousands of times. And those folks are active in the forum if you have questions as are many others!

    Also, a note about Coleman's post. That ".ConnectIQ" in his handle shows he's one of the Garmin CIQ guys, and others from Garmin also post here to help and answer questions. All of them are VERY helpful!