My watch face updates time every 500 ms in both modes ambient and regular. Updating time is stopped when document is hidden. So I did this:
document.addEventListener("visibilitychange", function() { if (!document.hidden) { interval = setInterval(update_watch, 500); } if (document.hidden) { clearInterval(interval); } });
Everything works fine when I test the app but when I disconnect a device from Tizen Studio and leave my Gear S3 for a while the app breaks down. Watch updates time only in regular mode and doesn't update time in ambient mode! Besides not working time updating during ambient mode the watch seems to be freezed. For example I have heart rate measuring, so app measures heart rate during 20 seconds and turns off measuring if data isn't got earlier. When watch is swithed to ambient mode time updating is stopped and the app measures heart rate infinitely! (*Heart rate measuring works perfect in regular mode*)
I don't know what is a reason. I tried a lot of cases but the result is always the same. It makes no sense because if the code is wrong it shouldn't work at all. I'm going crazy! :))))
I think it's it's something because of energy saving!
Please, help! )))