In my first app i want display current speed using Activity object.
In this way:
using Toybox.Activity;
function onUpdate(dc) {
var info = Activity.getActivityInfo();
var speedva = info.currentSpeed;
if (info != null) {
speedva = info.currentSpeed != null ? info.currentSpeed : 0;
}
dc.setColor(Graphics.COLOR_BLACK, Graphics.COLOR_WHITE);
dc.drawText(60,83, Graphics.FONT_SMALL, speedva, Graphics.TEXT_JUSTIFY_CENTER);
}
but display always zero value.
Where is my mistake ?
i have Edge 520.
thanks much