Documentation Request - Device Button Behaviour

Hi,

Could I make a documentation request? I can't find anything in the Compatible Devices section or the User Experience section, and I am struggling!

It would be good to see what different devices call on the events used in BehaviorDelegate (and InputDelegate) when different interactions are done.

For example
onSelect onMenu onNextMode etc
Epix Enter/Touchscreen
920XT
Vivoactive
etc

This would be very helpful for multi-device apps, as I am struggling to work out which devices call which events on which buttons!!

Thanks
Chris
  • I pretty much put inputs into three groups:

    1) things that are common such as onMenu, onBack, and KEY_START. All devices have this On some, onMenu may be a long hold of another button, but that's the way things also work in native apps.

    2) things that can be mapped - such as KEY_UP and KEY_DOWN, for which I use SWIPE_LEFT/SWIPE_RIGHT (the va for example) or SWIPE_UP/SWIPE_DOWN (the va-hr for example) on touch devices. And here I just have code in the delegate that does the same thing for the SWIPE or KEY. OnNextPage, onPreviousPage is probably another way to handle this, but I started looking at the key/swipes and just have stuck with that.

    3)Things unique to touch devices such as onTap and onHold, which really don't have a match for non touch devices. Using these make it harder to work on non touch devices, and I tend to only use them if I write something for a device with a touch screen.

    You can use Sys.getDeviceSettings().isTouchScreen to see if you're on a touch screen, but I found if I do the above, I don't need it.

    See "User Interactions" in the UXguide that comes with the SDK.
  • I understand how this could be useful to people that are new to the platform. The truth is that there's a lot of variance in our products that can cause some confusion. For example, the Fenix 3 has a bug Start/Enter button in the upper right, while the Forerunner 630 has a button in the same location that only acts as a start button (enter is handled by screen taps). Those sorts of differences can be even be frustrating for me. :)

    Between the User Interaction section of the UX Guide that Jim mentioned and Appendix A, you should be able to determine what's available on each device. I'll create a task to build a more explicit button-to-behavior mapping to help clarify things more.
  • Thanks both.

    It's already coded, so it was aimed at a reference guide.

    The recent example was the save or discard on a recording. On the VA I used the screen, but I wanted to find the best choice for all other devices (without touchscreen), so a reference table would have been useful.

    I found (as Brandon has highlighted) that different devices have different buttons (enter, menu, select). Therefore this would be a good look-up. It was also be valuable for seasoned developed when new devices are released.

    Cheers
    Chris
  • Some things can be helped by using things like standard menus and confirmation. They are native to the device and handle the differences.

    So, for example, I use a "Resume", "Save", "Discard" menu at times, and all I do is push the menu and in the menu delegate, use "onMenuItem(item)" to handle what was picked. Handing the buttons, etc, is left to what's there in the FW already.
  • Thanks Jim.

    It's probably worth me stepping back, to help understand why I posed the request.

    I was developing for the Epix. Unfortunately, I don't own one (I've only got a Edge 1000 and Vivoactive), however using the simulator (which I know could be wrong - but that would be another reason to support having the documentation). I noticed if you tap the screen you get an onSelect event fired from the BehaviorDelegate. So far, so good. You also get onSelect fired from the Vivoactive if you tap the screen.

    However I also noticed you get a onSelect fired if you press Start/Stop on the Epix (so two ways of firing the event). You also get onSelect fired on the 920XT from the Enter Key. But you don't get it from the Enter/Start key on the Vivoactive.

    So in summary, I found two ways to fire onSelect on the Epix, one on the 920XT and one on the Vivoactive; all slightly different.

    So basically, I was looking for a handy table that showed me which User Interaction Inputs fired what Events.

    Hope that helps.

    Cheers
    Chris
  • You should be able to get the information you want by running the Input sample program in the simulator or by looking at bin/devices.xml (the configuration file for the simulator). If there are cases where the device differs from the simulator, that is a bug and should be reported and fixed.

    Travis
  • Former Member
    Former Member over 8 years ago
    Can someone let me know what event corresponds to the press of the right button on the Vivoactive HR. I have figured out that the left is onBack which makes sense.

    I know that a hold of that button is onMenu. But what about just pressing it and not holding it ?

    Edit .. I ran the input sample and got this.



    So .. how do I make it in my Behavior Designate to use that key ? (I do not want to have to hold it for onMenu unless I have to)
  • KEY_ENTER is the key code, and onKey() is the handler.
  • Former Member
    Former Member over 8 years ago
    KEY_ENTER is the key code, and onKey() is the handler.


    I have no idea what a key code is ?
  • function onKey(evt) {
    if(evt.getKey()==Ui.KEY_ENTER || evt.getKey()==Ui.KEY_START) {