Acknowledged
CIQQA-3370

Instinct 3 Solar has System.DeviceSettings.isTouchScreen in Simulator and on Device

The Instinct 3 Solar exposed the System.DeviceSettings.isTouchScreen-property. It is set to false, but this property is widely used to discern device that have a touch-screen from devices that do not have a touch screen.

In my opinion it should not be exposed on devices that don't have a touch-screen.

The property is exposed in the simulator and on device for the Instinct 3 Solar.

  • @jim_m_58 Thank you for clarifying! I have I misunderstood how isTouchScreen is working. I've got the info from this post: https://forums.garmin.com/developer/connect-iq/f/discussion/229697/how-can-my-app-detect-if-the-watch-it-is-run-on-has-a-touchscreen and thought that's how to do it.

    @FlowState Detecting if the watch that the watchface is running on has a touchscreen is indeed what I'm trying to find out. It seems that the isTouchScreen-property is useless for that, as you can disable the touchscreen via "hotkeys" or the menu and it will look the same as if the device does not have one. From a user-perspective I'd rather display the "touch-is-disabled"-state than the "touch-is-enabled"-state - latter being the one possible with isTouchScreen. What is the best practice to find out of a device has a touch-screen built in? (please don't say junglefiles Fingers crossed)

    My Fenix5s does expose isTouchScreen on device - so it is indeed useless for determining if a device has touchscreen and if that touchscreen is enabled or disabled.

  • but this property is widely used to discern device that have a touch-screen from devices that do not have a touch screen.

    Are you sure about that? "Widely used..." according to who? chatgpt? DeviceSettings.isTouchScreen is unsuitable for this purpose, for 2 reasons:

    - it's actually present on all CIQ devices (see below)

    - if it's true, it means that a touchscreen is present and is enabled in settings. if it's false, it means that *either* a touchscreen is present (and is disabled in settings) or there is no touchscreen

    ---

    isTouchScreen has been available since CIQ 1.2.0, and is present on every single Connect IQ device afaik.

    For example, FR920XT - an 11-year old watch with no touchscreen - has the isTouchScreen property, at least according to the simulator.

    As a matter of fact, I'm almost certain that every single device supported by Connect IQ has the isTouchScreen property.

    There's two ways to figure this out:

    1) From the docs:

    - all CIQ devices have CIQ 1.2 or higher (there's a page in the CIQ dev docs site that confirms this)

    - the CIQ documentation for isTouchScreen says that's it's available since API 1.2 (https://developer.garmin.com/connect-iq/api-docs/Toybox/System/DeviceSettings.html#isTouchScreen-var)

    - there is no "supported devices" list in the isTouchScreen doc (which is what you'd normally see if a given field was excluded for some devices, especially if it's on any other basis than minimum API level)

    2) Search the device library (installed alongside the SDK) as follows:

    - String to search for: symbol="isTouchScreen"

    - Files to search: *.api.debug.xml

    You will see that every single CIQ device has the isTouchScreen symbol.

    As a counter-example, search the same files for symbol="requiresBurnInProtection". You will see that not all devices have this symbol.

    isTouchScreen by itself just means you can check if a device has a touch screen or not.  It's value determines if it's touch or not

    To be more precise: isTouchScreen is "true if the device has a touch screen and it is enabled in settings, otherwise false"

    (https://developer.garmin.com/connect-iq/api-docs/Toybox/System/DeviceSettings.html#isTouchScreen-var)

    This is an important distinction, as it's certainly possible for a 5-button device like FR265 or Fenix 7 to have a touchscreen, but the touchscreen is disabled in settings, in which case isTouchScreen would be false. Probably not a great choice of field/property names.

    Ofc you and I know this, but someone who is new to CIQ might just take what you said at face value. 

    After all, OP's implicit goal is to figure out whether a device has a touchscreen or not, and the isTouchScreen property is simply not enough. 

    - if it's not present, you can be sure that the device does not have a touchscreen

    - if it's present and true, you can be sure that the device has a touchscreen and it's enabled

    - if it's present and false, you have no information about whether the device has a touchscreen. All you know is that either the device does not have a touchscreen, or the device has a touchscreen and it's disabled

  • Again, if it has isTouchScreen, you need to check if isTouchScreen is true of false.

    The fr255 is an example of another device where the has is true, but the value of isTouchScreen is false.

  • That is pretty much what I do. If the touch-screen is disabled I draw something on the screen to show the state to the user. On other devices that do not have a touch-screen 

    System.getDeviceSettings() has :isTouchScreen

    evaluates to false. On the Instinct 3 Solar it evaluates to true. To my knowledge this is the only device that does not have a touch-screen where this evaluates to true.

  • isTouchScreen by itself just means you can check if a device has a touch screen or not.  It's value determines if it's touch or not

    Consider this.  There is a has check to see if it's available, and if it is, the value is obtained.  Works fine for in sim the sim with a number of devices

    		var t=false;
    		if(System.getDeviceSettings() has :isTouchScreen) {
    			t=System.getDeviceSettings().isTouchScreen;
    		}
    		System.println("t="+t);