I'd like to disable shortcuts when the application is open. Here is my code, it works on the simulation but not on the watch. When the down button is pressed, it will open a shortcut. Here is my code.
An idea of how I could disable them
Simon
I'd like to disable shortcuts when the application is open. Here is my code, it works on the simulation but not on the watch. When the down button is pressed, it will open a shortcut. Here is my code.
An idea of how I could disable them
Simon
You can't disable user-defined shortcuts or any system-wide inputs (e.g. on five-button watches, press LIGHT to toggle backlight/full brightness, hold LIGHT to open control menu.)
That's why, on a five-button watch, the only "safe" button inputs to handle are short presses of START, LAP/BACK, UP, and DOWN, and a long press of UP. You can't rely on being able to process a long press of any of the other buttons, since those inputs could be used by a shortcut. Also, on very old devices, it isn't even possible for CIQ to detect a long press.
It's a shame that the simulator gives you the impression an app can act on certain inputs that it will never see on a real device (such as pressing LIGHT).
As stated, apps can’t disable reserved shortcuts or handle those inputs for their own purposes. I understand your frustration, but that’s the reality. I actually have an app that *optionally* supports long-press of BACK or START, but I don’t require the use of those gestures since I know that users can assign them to shortcuts, which means my app wouldn’t be able to act on them. If you want to handle a long-press of DOWN, just be aware that the vast majority of 5-button watches won’t pass that input to your app.
It’s not too different than how an Apple Watch app cannot override/handle the behavior on press of the (right-side) button or crown, except for the case when you press them simultaneously.