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
Forget about the simulator... once I lost an entire sunday programming a watch face that would smartly update only the section of the screen that has changed and then when I tested on the physical unit I learned that the it deletes the whole screen every second. While the same unit in the simulador preserved the previous screen.
Different devices handle this differently, and the sim always assumes no clearing. On a real device, even it it doesn't clear, things like notifications and toasts can wipe out part of the screen and you don't know that happened so you can't tell what you need to update.
.
This has come up a number of times during the years, and the basic rule is in onUpdate() you always want to redraw everything, The only time you can update only part of the screen is if your onPartialUpdate() is called. With it, there are also limits on how much of the screen you can update, and there is a limit where the the average time the calls can take has to be 30ms or less. And no accessing to the file system in onPartialUpdate
Thanks for raising this Simon. I ran into the exact same issue, and I'm not satisfied with the recommendation to avoid handling long presses since it effectively halves the size of the user input space.
I put in a feature request here, please go show your support: https://forums.garmin.com/developer/connect-iq/i/bug-reports/feature-request-suppress-user-shortcuts
It's really not a recommendation, more like a fact. You want your app to act like every other app the user uses for consistency. If long-press down take a user to music, you want the same in your app. Same with menu and long press up or long press back (depending in the device). I usually assign light+back at the same time to take a screen shot. Long press light or long press start do different things based on the device.
And older devices won't change
An app doing its own long press detection has come up a number of times in the decade that CIQ has been available and it's not changed.