You are reading a single comment by @Jonathan and its replies. Click here to read the full conversation.
  • I've just begun trying to program my first app for bangle.js 2, a very simple reminder. Idea is, you activate it by pressing button 1 three times. While it is active, a small widget is shown and it vibrates every x minutes. You can deactivate it by pressing the button again three times. You can also automatically activate it at x o'clock, for example to gently remind you to take medicine or not forget something without needing to be "snoozed" like a mobile phone alarm.

    I've realised it before with an Amazfit Bip and Tasker which was very convoluted but turned out to be really helpfull to remind me of stuff. (Timed activation to take afternoon medication, spontaneous activation to not forget doing x while doing something else).

    I have the basic software running, but as I am completely new to js and bangle (but have experience in C an Python) I don't fully understand variable and action "scopes". I have the code saved as annoy.boot.js so it is executed automatically and just starts a listener for a button event. I've also defined variables there if the function is active or not. However, everytime I change back from the launcher to clock or app to clock, I think the settings are lost.

    Is there a good primer on js/bangle.js, which "scope" (are they called frames in js?) is active at which status and what happens/what is deleted when switching from app to clock?

    Thanks in advance and huge thanks to Gordon and the team for making it super easy to go from no idea in js to first prototype app running on actual hardware in about a day!

About

Avatar for Jonathan @Jonathan started