An app for SDK 3.2 and 3.1?

I have developed watchface for SDK 3.2 as it shows Solar charging Intensity for solar models.

I am getting requests from potential users with older watch like fenix 5 (SDK 3.1) as they love animation (it is not related to the solar charging) on the watch face to develop SDK 3.1 compatible version.

For SDK 3.2 it is easy to detect does watch model supports or not solar charging and displays or not solar charging indicator.

But watchface compiled for 3.2 is not compatible with older models.

I think it should be possible to avoid developing two dedicated versions of the very similar watch faces just to be compatible with 3.2 and 3.1.

Please point me in the right direction how to redevelop app to be compatible with SDK 3.1 and 3.2?

  • What are conditions to have it negative? I am curious to use it for some visualisation for the watch face.

    You could get a negative value any time the charging circuitry indicates that it isn't charging the battery. This may be because the charging system is disabled or broken, or because the battery can not or should not be charged.

  • Thank you for more detailed explanation! Could you show (link) to the WF with Solar Charging indication mentioned by you?

  • Simple Lean G2

    It uses on device settings, and for the "Temperature plus" menu item, I added a "Solar intensity" option to be displayed along side the temperature on devices that support solar.  With the menu item in the middle, press the upper right button to rotate through the options.

  • got -1 on charging, but can't get it for 100% battery...

    not sure for "before sunrise" as many times checked WF before and it never shows -1, only 0

  • It's not impacted by sunrise/sunset.  Sunrise is still an hour away here and I see 0.  Plug in the watch to get it to 100%

  • charged watch a little bit more after got 100% and finally I see -1! Thank you! Going to change Solar Intensity indication for my WF to replace negative with simple "--".

  • I have impressed how Menu is implemented for WF 'Simple Lean G2'.

    SDK examples contains Analog watchface, which actually shows WF menu, but via additional view with a text "Press Menu \nfor settings". It is not best way for end-users.

    Could you share / explain how to get menu for WF in way (immediately show menu items when Customise is triggered) as it implemented by 'Simple Lean G2'?

    I can assume what you did for 'Simple Lean G2' is your intellectual property, but please consider to share a little bit of it. Thank you!

  • There's not actually much to it.

    In my AppBase, I have

        function getSettingsView() {
            return [new SLeanSettingsMenu(),new SLeanSettingsMenuDelegate()];
        } 

    Then the basics of SLeanSettingsMenu:

    class SLeanSettingsMenu extends WatchUi.Menu2 {
    
        function initialize() {
            Menu2.initialize(null);
            Menu2.setTitle("Settings");
    		Menu2.addItem(new WatchUi.ToggleMenuItem("Show Seconds When Possible", null,"sec",MySettings.showSecs, null));
            //other things
        }    
    }

    And the basics of the delegate:

    class SLeanSettingsMenuDelegate extends WatchUi.Menu2InputDelegate {
        function initialize() {
            Menu2InputDelegate.initialize();
        }
    
      	function onSelect(item) {
      		var id=item.getId();
            if(id.equals("sec")) {
      			MySettings.showSecs=!MySettings.showSecs;
      			MySettings.writeKey(MySettings.showSecsKey,MySettings.showSecs);
      		}
      	}
      	
      	function onBack() {
            WatchUi.popView(WatchUi.SLIDE_IMMEDIATE);
    		return false;
        }
    }

    MySettings is a class where I read and write things to storage.

  • Wow! Thank you very much!

    I did magic to show menu immediately but didn't manage to back to the WF, I see, main trick is onBack()!

    Thank you!

  • Yes, that's menu2.  When you are on a specific menu item, pressing select will keep toggling a ToggleMenuItem, until you back out.  I also handle things like rotating through colors in SimpleLean G2 that way.