interface.html: Controlling the current Bangle.js app #7759
Unanswered
ticalc-travis
asked this question in
Bangle.js
Replies: 1 comment
-
You could use something like ... or what about writing your updated timer file and then doing something like:
Where |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've got together a working interface.html that provides an alternate way of editing the timer definitions in the app I'm working on. But I just discovered by accident that it's possible to click the Save Timers button in this interface while the timer app is currently running on the Bangle.js. The app doesn't know about the updated timers file just pushed to the device, so it retains the old data in memory and ends up overwriting the new data just pushed. Is there a way to ensure the app is not running when this happens, e.g. by forcing it to exit before sending the timers file, so that when it's loaded again it picks up the new data properly? The most obvious idea would be to send a
load()
call, but it seems I had trouble with that from interface.html before. But maybe it would okay if I did that, wait a moment, and then do theUtil.writeStorage
in asetTimeout
call?Beta Was this translation helpful? Give feedback.
All reactions