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
  • 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.

Comment
  • 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.

Children
No Data