My mistake.
---
Connect IQ SDK 3.6
Some users my Stop and Go stopwatch widget are reporting that pressing the KEY does not work. Instead of starting the stopwatch, it only returns them to the watchface.
https://apps.garmin.com/en-US/apps/3...0-a7dc7bdc72b8
The way it's supposed to work is:
- If you press the key on the widget "home page":
-- If the timer is reset, the widget is entered and the stopwatch starts
-- If the timer is running/stopped, the widget is entered
- If you press the key when already in the widget, the stopwatch state is toggled between started/stopped.
This works fine for me in the simulator and on a real 935. Two VA3 users have complained about being unable to start the stopwatch. Another VA3 user says that it works just fine.
Couple of wrinkles:
- I have code to detect long presses. Long press of start does something on platforms where this is not taken up by some other function. I realize that onKeyPressed/onKeyReleased are not supported on every platform, but I have fallback code in onKey() which checks to see if onKeyPressed was previously called for that key. I guess the only way this could fail is if onKeyPressed is called, but onKeyReleased never is, in which case I would have to skip that logic for VA3.
- I have already implemented a workaround based on a VA3 issue that was reported last year:
private function getKey(keyEvent)
{
var k = keyEvent.getKey();
if (sVivoactive3)
{
if (k == 45 || k == 47 || k == 49)
{
k = WatchUi.KEY_ENTER;
}
}
return k;
}
Reading through the forums, I see these related issues:
https://forums.garmin.com/forum/deve...ansferred-code
https://forums.garmin.com/forum/deve...-on-the-device