Datafields don't persist in activity on Vivoactive 3?

Former Member
Former Member

Hi, I've created a custom beta datafield that shows Heading in degrees. The code is really simple..

class headingdatafieldView extends WatchUi.SimpleDataField {

    function initialize() {
        SimpleDataField.initialize();
        label = "Heading";
    }

    function compute(info) {
        var heading = (info.currentHeading * 180 / Math.PI).toNumber();
        if (heading < 0) {
        	return 360 + heading;
        }
        return heading;
    }
}

I've downloaded the datafield and added it to a custom activity. It works great for the first recording, but on subsequent starts is replaced with a Timer datafield. This seems to happen for any datafield I've downloaded from ConnectIQ.

Is there a way to save these datafields, and not re-add them to the layout?