Saving configuration data for a watch face.

Posted on
  • "Configuration data for a watch face?" I hear you asking. Am I crazy? Maybe not. Here's the use case. I have a watch face that I'm working on that includes the display of the time in another timezone.

    I personally find it very useful, because I have relatives spread across Europe, family in both England and Switzerland. So it's handy to know what time it is there before sending a text and waking them up at 3:00 AM local time.

    The config data is pairs of values:

    { "name": "LON", "offset": 480 },
    { "name": "ZUR", "offset": 560 }

    is how it would be represented in JSON. You can work out from these that I live on the west coast of the USofA. What I need is a way for the watch face to get this data, presumably via BLE, and then save it to some sort of persistent storage that will survive across a restart of the watch face.

    There's enough information about BLE that I can probably figure that out myself, but I'm at a complete loss as to how to save data permanently in a form that a watch face can access.

    On a very closely related topic, is Bangle.js aware oft timezones and daylight savings? Meaning if I tell it that I live in the america/los_angeles timezone, does it know how to change itself every March and November, without needing a connection to a compter or phone?

  • Ok, what you're after looks like it's similar to some other clock apps - for example­ (there are some others, like

    Those use a 'customiser' page on the app loader to let you configure them from the App Loader (­m)

    You can check the code out at­ree/master/apps/worldclock but basically:

    is Bangle.js aware of timezones and daylight savings?

    It's not enabled by default, but if you install then yes it is

  • Never Mind - I found the solution. Just can't delete this post.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Saving configuration data for a watch face.

Posted by Avatar for dgnuff @dgnuff