Trouble with Simulator and SDK - Visual Studio Code

Hi all.

I have a problem with Simulator and SDK Manager with Visual Studio Code.

I'm developing a watchface in my free time since 3 days, it all worked.

Yesternday, the SDK Manager downloaded SDK 6.3.0, I have updated and set as Current SDK.

Yesternday night, I have created a new custom font with icons on Bitmap Font Generator.

Tested the watchface and on Simulator, when I set Phone Battery, or bluetooth connection or something else, it simply doesn't refresh.

I think that the problem is in my code, but I only changed a font...

I see that the watchface is working sice seconds are updating, but not conditions...

My code doesn't have onPartialUpdate,

I will explain my code:

class MyWatchFace extends WatchUi.WatchFace {

    [...]
     // Update the view
    function onUpdate(dc as Dc) as Void {
        // Get the current time and format it correctly
        centerX = dc.getWidth()/2;
        centerY = dc.getHeight()/2;
        dimX = dc.getWidth();
        dimY = dc.getHeight();
        
        clearClip(dc);
        
        View.onUpdate(dc);

        setAllViews(dc);
    }
    
    [...]
    
    function clearClip(dc) as Void {
        if (Graphics.Dc has :clearClip) {
            dc.clearClip();
        }
    }
    
    [...]
    
    function setAllViews(dc as Dc) as Void {
        setWidthAndHeight(dc);
        getTheme(dc);
        if (getProp("CircleSettings")!=FieldType.NOTHING) {setCircle(dc);}
        if (getProp("ShowTopIcons")) {setTopIcons(dc);}
        setAvailableDataFields();
        setDataFields(dc);
        setDate(dc);
        setTime(dc);
    }
    
}

In setWidthAndHeight() I only check width for calculate spacings (rounded devices);

getTheme(dc) get theme property and set background;

setCircle(dc) draw a circle on perimeter based on seconds or user property;

setTopIcons(dc) draw state icons [eg bluetooth, dnd, alarms];

setAvailableDataFields() check if the device has special functions [eg solar intensity];

setDataFields(dc) draw data fields based on user settings;

setDate and setTime you can imagine Stuck out tongue

The code works, there aren't crashes or something, but when I have data field battery, and set the battery status in simulator it doesn't refresh.

I have noticed that when I uncheck and check App Lock Enabled in Simulator==>Simulation, the data fields refreshes. I've noticet that the Time refreshes correctly.

Yesternday night, I tought that this was an SDK Mistake, so I deleted SDK 6.3.0 from SDK manager, and set Current 6.2.2 but the problem doesn't solved, so I tried to update again to SDK 6.3.0 but I can't see update, so I can't update.

I checked for breakpoints in Code but not founds, and removed all breakpoints with Keyboard Shortcut.

Anyone have an hint?

[EDIT]

I have noticed this behaviour on smartwatch too!

Thanks

  • I've solved: I have declared

    mSettings = System.getDeviceSettings();
    mStats = System.getSystemStats();
    mActivity = ActivityMonitor.getInfo();

    In onUpdate instead of global,

    But can't update SDK now lol