10-09-2018 07:15
10-09-2018 07:15
Hi,
I've a very weird issue. I was playing with different clockfaces and yesterday went back to my own clockface which was working as intended for last 1-2 weeks. After getting back to my Clockface I noticed that it no longer displays the heart rate even though I have not changed my code (I published a new update but according to gam it is still under review, also update did not have any changes to heartrate). I am additionally using k-pay.
// index.js
// Create new HR Sensor handle let hrm = new HeartRateSensor(); // When the value changes, update text hrm.onreading = function() { // Peek the current sensor values hrtValue.text = hrm.heartRate || 0; // Stop monitoring the sensor hrm.stop(); } // Update calories, altitude, steps and heartrate function updateText() { //Update only if display is turned on to save battery life if (display.on) { hrm.start(); } }
I've also tried putting hrm.start() outside of the display.on but still have the same problem.
Any ideas? Studio console also does not display any errors
Answered! Go to the Best Answer.
10-09-2018 08:30
10-09-2018 08:30
switching to:
import './kpay/release/kpay_messaging.js';
instead of:
import './kpay/release/kpay_filetransfer.js';
Worked!
10-09-2018 07:37
10-09-2018 07:37
It seems to be an issue with K-Pay. After removing K-Pay components heart rate started working again
10-09-2018 08:30
10-09-2018 08:30
switching to:
import './kpay/release/kpay_messaging.js';
instead of:
import './kpay/release/kpay_filetransfer.js';
Worked!
10-09-2018 09:03
10-09-2018 09:03
You might just need to reboot your device. There was a known issue where messaging fails to load due to low memory, but it's been fixed in 2.2
10-09-2018 09:05
10-09-2018 09:05
thanks for a reply. I already switched my clockfaces to the method I described above. If that fails I will revert to the recommended method as described by k-pay and reboot a device.
10-14-2018 05:08
10-14-2018 05:08
@JonFitbit - Recently (last 3 weeks or so) I have also had some users of my watch faces for Ionic and Versa report that stat readings and hr is not loading on the watch face. Some are users who have been using them and they have stopped. New users have had the issue upon downloading them.
I am am unable to duplicate it on my test devices or within the simulators. With the changes to the SDK and the update to 2.2, is this something that is related to low memory not loading messaging?
10-15-2018 13:54
10-15-2018 13:54
@jomis003 wrote:
@JonFitbit - Recently (last 3 weeks or so) I have also had some users of my watch faces for Ionic and Versa report that stat readings and hr is not loading on the watch face. Some are users who have been using them and they have stopped. New users have had the issue upon downloading them.
That's a strange one, I would expect all of the stats to be unavailable if it was the memory issue, unless the values for `active minutes` and `distance` are defined in your gui file?
10-15-2018 15:51
10-15-2018 15:51
It is a strange one indeed. The GUI file is only calling the text ID and setting a default of the “- -“. Then in the .js file I have a function that pulls the today.adjusted.”stat” and sets it to the text element.
Right now, each stat reading is separated into their own function exported and the called by the index.js. I could try to combine them into a single function but not sure how that would change anything. Like I said, I can’t recreate it and only a few are complaining.
10-20-2018 01:29
10-20-2018 01:29
i have had a user contact me about something similar too. they have said they are seeing NULL or the 2 dashes that i show if the timestamp is the same.