Acknowledged

keyEvent.getKey() == 4 short vrs long pressed

Hi! I have the following problem, you might know the reason/solution.

I have the following code line:  if (keyEvent.getKey() == 4) {onSelect_lauch();}

I found that, in the simulator, for several devices, when I press the "Start-Stop buttom" (Key 4), if I press it long (not just one click but a "long" click), it launches properly the function but if I press it short, I gives me the typical error "Symbol Not found Error". It is an App (not a widget).

Error: Symbol Not Found Error

Details: Failed invoking <symbol>

Stack:

Do you know why and how to solve it?

Thanks!

Parents
  • Thanks your your reply. However, this does not seem to be the problem. I tried with your code and still not working...the problem is the duration the buttom button 4 is pressed. If pressed just once, quick, does not work, if pressed once long (push, wait, release) it works...

    Fair enough, but my point still stands. WatchUi.SLIDE_BLINK will not work on older devices, such as Vivoactive 3. This may be fine if you don't intend on supporting old devices.

    It would help to know exactly which line is crashing.

Comment
  • Thanks your your reply. However, this does not seem to be the problem. I tried with your code and still not working...the problem is the duration the buttom button 4 is pressed. If pressed just once, quick, does not work, if pressed once long (push, wait, release) it works...

    Fair enough, but my point still stands. WatchUi.SLIDE_BLINK will not work on older devices, such as Vivoactive 3. This may be fine if you don't intend on supporting old devices.

    It would help to know exactly which line is crashing.

Children