Disable touch programmatically

I notice that some Garmin Apps on the F7/Epix Gen2 range display the ability to turn off the touch screen:

Is that functionality available in the Toybox API?

Top Replies

All Replies

  • In my case, that's still a minimum of 30 changes in 8 files that I would have to make and test.

    Plus a bunch of complex changes to my five behaviour delegates to selectively ignore touch gestures.

    (and you still have a typo in jungles example which really confirms just how tricky it really is to use!)

    My solution is sooo much simpler, if only I could rely on DeviceSettings().isTouchScreen.

    Can you confirm that you have tested the state of DeviceSettings().isTouchScreen on a real device with the touch screen disabled?

  • I've tested an app while it runs, and if touch is toggled by way of controls.  isTouchScreen changes as it should.  You just need to keep checking it.

    With what I posted for jungles, you can always assume buttons even if isTouchScreen is true.

  • I've tested an app while it runs, and if touch is toggled by way of controls.  isTouchScreen changes as it should.  You just need to keep checking it.

    You raise a very significant point. Is it actually possible to toggle the touch while a watchApp is running?

    How would you do that?

    [EDIT] Oh, I see, the menu from a long-press on the Light Button operates while the app is running. So yes, I'll have to check regularly. Thanks for the heads-up.

  • The user can also set a hot-key to toggle touch which can be done any time during an activity.  In fact, I believe the default hot key for this with a clean setup is Light+Back.  

  • Thanks, all good to know.

  • I just got my F7 and noticed that the system default is to only use the touch screen for general use and there is a system option that defaults to off while in an activity.  When the activity starts the user gets prompted with the touchscreen status, which can be left at the system default or individually configured in the activity settings.

    For CIQ apps your only option is to check the status of the system setting and react according.  It does properly adjust the setting based on the status.

  • So it sounds like there's a couple of paths forward on this for , and the remaining open concern is the touch screen control in the sim that doesn't seem to be working properly. That we'll get investigated and potentially fix in a future SDK release (I say potentially, because I'm not certain on the number and nature of the issues with it, but based on some experimentation, it does appear to need some attention). I realize that won't help address short-term development challenges, but hopefully the info in this thread provides enough info for to proceed with some confidence.

  • When the activity starts the user gets prompted with the touchscreen status,

    Even after 4 years working with Garmin devices, I'm not sure what is meany by "activity starts". I don't thing that applies to watch apps does it?

  • An activity is something like "run", "walk", "bike" - the whole list of activities you get when you press start from a watch face.  In my tests, CIQ device apps and super apps use the general setting for touch and not the "during activities: setting.

  • the whole list of activities you get when you press start from a watch face.

    But that list includes CIQ watchApps as well as Garmin "Native" apps!

    Does that mean all  WatchApp are "Activites"? Are there any activities that aren's watchApps? I'm still confused!