The forerunner 45 (fr45) comes 6 preinstalled watch faces. Is the code available for these? If so, where?
The forerunner 45 (fr45) comes 6 preinstalled watch faces. Is the code available for these? If so, where?
No it's not. They are written in native code in the watch firmware and not CIQ.
The fr45 is really CIQ 1.4.0. and other devices are already on CIQ 4.x (the venu2 for example). The size of CIQ watch faces (that's the only app type you can use on a fr45) is smaller than other devices…
If I recall correctly, the MIPS-based devices will update every second while it's "awake" (about 10 seconds after you raise it to glance at the screen), and once a minute when it's not awake. you can override…
There a no CIQ 2 devices that still support onPartialUpdate. There's HW involved and devices with that HW are now CIQ3 and above.
Fair enough, the documentation says it was added in 2.3.0. But again, the great thing is that you can define it, and it will ignore it if the watch doesn't support it!
It was added in 2.3.0 and the first device with the needed HW was the f5. running 2.3.0!
You can check "supported devices" in the API doc included with an SDK and see what devices should support it now.
So, I cleaned up a few things and yeah, it's still not getting the data with Activity.getActivityInfo().currentHeartRate on the device.
I mostly prototype in the sim, and do the things that should work then build to the device. I wasn't sure about that Simulation>Activity Data>File/Simulation bit.
Thanks for sharing that one. Nice job with it, it looks really well done. Is the code available for it somewhere too? Were you suggesting that I run it in the simulator or the device?
I don't post complete code for any of my apps, but here's the HR bit:
// in the view's initialize() hasHr=(ActivityMonitor has :getHeartRateHistory); //in onUpdate() if(!hasHr) {return;} var hr="--"; var newHr=Activity.getActivityInfo().currentHeartRate; if(newHr==null) { var hrh=ActMon.getHeartRateHistory(1,true); if(hrh!=null) { var hrs=hrh.next(); if(hrs!=null && hrs.heartRate!=null && hrs.heartRate!=ActMon.INVALID_HR_SAMPLE) { newHr=hrs.heartRate; } } } if(newHr!=null) {hr=newHr.toNumber();}
Wow, that's fantastic, and worked. I hadn't tried that layered fallback approach. It worked and it's updating via line 13 (newHr=hrs.heartRate;). Thank you!
I pulled that code from a watch face that runs on all watches, so nothing special to do if you add more target devices.