For example, following members always return "null" :
- Activity.Info.totalAscent
- Activity.Info.totalDescent
- Activity.Info.maxSpeed
- Activity.Info.averageSpeed
Following members are OK :
- Activity.Info.altitude
- Activity.Info.currentSpeed
With Connect IQ SDK version 1.2.11 (and below) all these values are correctly returned. I did not test SDK 1.3 and 1.4 (no longer available on Garmin servers ?)
I have tested 3 different versions of Eclipse on a Windows 10 64 bit machine with the same behavior :
- Eclipse Luna Service Release 2 (4.4.2)
- Eclipse Mars.2 Release (4.5.2)
- Eclipse Neon.2 Release (4.6.2)
Important point : on my real Epix device all these values are correctly returned => the issue appears only in the Simulator.
The best way to reproduce this issue is to create a new Simple Data Field Project, and replace "return 0;" by "return info.maxSpeed;" for example. With SDK 2.1.1 up to 2.2.4 it returns nothing, and with SDK 1.2.11 it returns a number.
using Toybox.WatchUi as Ui;
class SimpleDataFieldView extends Ui.SimpleDataField {
// Set the label of the data field here.
function initialize() {
SimpleDataField.initialize();
label = "My Label";
}
// The given info object contains all the current workout
// information. Calculate a value and return it in this method.
function compute(info) {
// See Activity.Info in the documentation for available information.
return info.maxSpeed;
}
}