Enter, Start, or onSelect for Edge Apps

I have recently extended 4 Apps to also work on the Edge Series devices.

One problem is that I'm not getting an onKey event when pressing the start or lap buttons on the Edge 520 or 1000. (I don't have an 820 to test). The simulator does call onKey when these buttons are pressed. This problem has already been reported to Garmin.

The next issue is with the 520. To Start an activity on the Edge devices, you press the Start button which causes (is supposed to cause) an onKey event with the Key = KEY_START = 18. To Start an activity on all of the watches, you press the Enter button which returns an onKey event with KEY = KEY_ENTER = 4.

At first glance, this is no problem in my apps because I can start the activity when I see either KEY_ENTER, or KEY_START.

However, the Edge 520 has a bit of confusion. It has both a Start button and an Enter button. If I simply use an OR statement, then the app will start when the Enter button is pressed which might be unexpected behavior. Especially since a long hold on the Enter button is what brings up the Menu. You can get to the menu without triggering an Enter button key event if you are careful not to release too soon but it's not ideal.

The onSelect Behavior isn't a solution because it only responds to Enter key presses.

Of course its a straight forward solution to add something to the 520 resource file to identify it and then make the logic to start an activity to be

if (key == KEY_START || (key == KEY_ENTER && device != "edge")) {
activity.start()
}


This just seems inelegant for such a basic function as starting an activity. Is there a more elegant approach that I'm missing???

DOCUMENTATION UPDATE REQUEST - The onSelect behaviour is listed in the Toybox.html documentation under ToyBox>>WatchUI>>BehaviourDelegate, but its missing in the Behaviors section of the Programmer's Guide.
  • Roger - I'm also porting a watch-app to the edges, but don't have one, so I'm only using the sim. The 820 and 1000 do seem "normal" to me, and I too do things you mention with KEY_START and KEY_ENTER. The 520 is a bit different though and I'm thinking I'll have to know I'm running on a 520 so I can do some different things....

    As far as the real devices, the production FW with 2.1.1 came out today for the edges, so you may want to load that if you're having problems on real devices...
  • Oh, BTW, have you noticed in the sim when you go to a standard menu in an app for the 820 or 1000, the back and menu screen buttons go away? (no way to just back out of a menu. have you tried this on a real edge? Is it the same?