Under Review
over 1 year ago

Instinct 2x does not have API for Flashlight

Instinct 2x has flashlight, but when i've tried to use it in own app, i've found that watch support API lvl 3.4.0 and Flashlight API (setFlashlightMode) becomes available starting from API 4.2.0.

And this is quite weird.

I will quote your own documentation( https://developer.garmin.com/connect-iq/connect-iq-basics/ ):

If a device has a magnetometer, the device should have available the Magnetometer API.

Parents
  • Nope, it doesn't. 

    In released version 14.12 changelog is

    Enabled Torch support for CIQ apps.

    But in emulator and on real device i can't see that this api is working.

    I use this check to show menu:

        if(Attention has :setFlashlightMode){
            ...
        }
    

    And menu item does not shows

    Also i've noticed that for setFlashlightMode changed API lvl to 3.4.3 instead of 4.2.0 but Instinct 2x does have 3.4.2 API lvl.

Comment
  • Nope, it doesn't. 

    In released version 14.12 changelog is

    Enabled Torch support for CIQ apps.

    But in emulator and on real device i can't see that this api is working.

    I use this check to show menu:

        if(Attention has :setFlashlightMode){
            ...
        }
    

    And menu item does not shows

    Also i've noticed that for setFlashlightMode changed API lvl to 3.4.3 instead of 4.2.0 but Instinct 2x does have 3.4.2 API lvl.

Children
  • I've made simple app with this code

        if(Attention has :setFlashlightMode){
            dc.drawText(self.w/2, self.h/2, Graphics.FONT_SMALL, "Flashlight api exists", Graphics.TEXT_JUSTIFY_CENTER | Graphics.TEXT_JUSTIFY_VCENTER);
        }else{
            dc.drawText(self.w/2, self.h/2, Graphics.FONT_SMALL, "Flashlight api \nDOES NOT exists", Graphics.TEXT_JUSTIFY_CENTER | Graphics.TEXT_JUSTIFY_VCENTER);
        }
    

    and get negative result, means that func setFlashlightMode does not exists. I did check on real device.

  • I've checked that device does have 3.4.3 CIQ.