I am trying to create a timer to update the time for a watchface for the Amazfit band 7 which uses ZeppOS v1.0 API.
function startClock() {
const timer1 = timer.createTimer(
500,
1000,
function () {
drawTime(); // Call the function to update the time on the screen
}
);
// Optionally, keep a reference to the timer if you need to stop it later
this.timer = timer1;
}
function stopClock() {
if (this.timer) {
timer.stopTimer(this.timer);
}
}
But the typeof timer is null and thus createTimer is undefined
I am trying to create a timer to update the time for a watchface for the Amazfit band 7 which uses ZeppOS v1.0 API.
But the typeof timer is null and thus createTimer is undefined
According to the API docs: https://docs.zepp.com/docs/1.0/watchface/api/timer/createTimer/ there should be a timer object available. (somehow it is null, not undefined).
Any ideas?