How to use the Watch Face Configuration API to allow users to select complications for display on the watch face?

Hello,

I have developed a watch face and I would now like to allow users to select what data is shown on the watch face.

There is the Watch Face Configuration API for that (https://developer.garmin.com/connect-iq/core-topics/editing-watch-faces-on-device/), but I don't quite understand how to use it in my watch face...

The watch face currently doesn't use Complications but just displays fixed data in the fields.

Could someone please help me get started on using this API?

Also, (how) could I test the configuration in the Simulator?

Thanks in advance 

Aaron

  • See  Simple Example WF that shows a bunch of things 

    One of the things it does is show a complication for heart rate.  Pressing it in the sim shows a screen saying "Heart Rate Launched".  On a real device, it actually launches it.

  • function initialize() {
        AppBase.initialize();
    }
    
    function getInitialView() {
        return [ new MainView(), new MainViewDelegate() ];
    }
    
    function getSettingsView() {
        var menu = new WatchUi.Menu2({:title=>"Customize"});
        menu.addItem(new WatchUi.MenuItem("Hour Color", null, "HourColor", null));
        menu.addItem(new WatchUi.MenuItem("Minute Color", null, "MinuteColor", null));
        ...
    }
    

    I do something like this to get the settings on a watch face by pressing Menu -> Watch Face -> and then you have Appy/ Customize.