In SDK 9.1.0 four methods were added to UserProfile: getHeartRateZones2(), getPowerZones(), getFunctionalThresholdPower() and getCurrentSport2().
I can get data from three of them but not from getPowerZones(), it returns null.
I tried it in the simulator and on my Edge 1050.
Did anyone try and succeed?
This is what I coded to test the method:
if (UserProfile has :getPowerZones) {
System.println("Using getPowerZones from UserProfile");
var sport = UserProfile.getCurrentSport2();
var pZones;
System.println("sport: " + sport);
if (sport != null && sport.size() > 0) {
System.println("Using getPowerZones for sport: " + sport[0]);
pZones = UserProfile.getPowerZones(sport[0]);
System.println("pZones1: " + pZones);
}
}
