Hi Guys.
Anyone having problems with getHeartRateZones in the simulator.
It returns [32, 32, 32, 32, 32, 32]
Best regards, Kees
Hi Guys.
Anyone having problems with getHeartRateZones in the simulator.
It returns [32, 32, 32, 32, 32, 32]
Best regards, Kees
Something very unusual is going on here. I'm not able to reproduce this problem. I've pasted my code and the output in this thread:
https://forums.garmin.com/developer/connect-iq/i/bug-reports…
Hi Travis,
I am seeing this one still today... are you sure we don't need to report it?
// CODE System.println("ZONES ARE "+UserProfile.getCurrentSport()+" "+UserProfile.getHeartRateZones(0)); …
I just tried to reproduce again using the 3.2.5 and 4.0.0.preview1 SDKs and still cannot reproduce. Have you tried wiping out your temporary folder (on Windows C:\Users\<Username>\AppData\Local\Temp\GARMIN…
You may want to check with the 3.2.2 SDK and if the problem still exists, submit a bug report (https://forums.garmin.com/developer/connect-iq/i/bug-reports). Staying on 3.1.9 at this point isn't really a solution in the long term, as new devices are being added to 3.2, and the sooner this is reported the more likely it will be fixed in the next SDK.
No need to report this one. It has been previously pointed out and filed as WERETECH-9596.
Something very unusual is going on here. I'm not able to reproduce this problem. I've pasted my code and the output in this thread:
https://forums.garmin.com/developer/connect-iq/i/bug-reports/sdk-3-2-1-vs-sdk-3-1-9-runtime-error
If you have any additional information that may help me to reproduce it, please post in that thread.
Hi Travis,
I am seeing this one still today... are you sure we don't need to report it?
// CODE
System.println("ZONES ARE "+UserProfile.getCurrentSport()+" "+UserProfile.getHeartRateZones(0));
// RESULT
ZONES ARE 0 [110, 110, 110, 110, 110, 110]
I see the same issue on 3.2.5 SDK.
In my case getHeartRateZones returns all zeroes in the call:
var zones = UserProfile.getHeartRateZones(UserProfile.getCurrentSport());
Test code from Travis:
var sports = [
UserProfile.HR_ZONE_SPORT_GENERIC,
UserProfile.HR_ZONE_SPORT_RUNNING,
UserProfile.HR_ZONE_SPORT_BIKING,
UserProfile.HR_ZONE_SPORT_SWIMMING ];
for (var i = 0; i < sports.size(); ++i) {
var heartRateZones = UserProfile.getHeartRateZones(sports[i]);
System.println(heartRateZones);
}
gives the following result:
[0, 0, 0, 0, 0, 0] [0, 0, 0, 0, 0, 0] [0, 0, 0, 0, 0, 0] [0, 0, 0, 0, 2, 0]
On 3.1.9 SDK everything is fine.
I thought Simulator from newer version of SDK has a possibility to define heart rate zones, so I need to just find right menu item and set digits instead of zeroes, but I have not managed to find anything like that.
I just tried to reproduce again using the 3.2.5 and 4.0.0.preview1 SDKs and still cannot reproduce. Have you tried wiping out your temporary folder (on Windows C:\Users\<Username>\AppData\Local\Temp\GARMIN).
Does look like wiping the user data temp directory is a workaround.
Before wipe:
var p = UserProfile.getProfile();
var zones = p.getProfile().getHeartRateZones(p.getCurrentSport());
System.println("ZONES "+zones);
// BEFORE WIPE TEMP DIRECTORY
//ZONES [110, 110, 110, 110, 110, 110]
// AFTER WIPE TEMP DIRECTORY
//ZONES [93, 111, 130, 148, 167, 185]thanks for highlighting this. After months of not having HR Zones it's back again