• My gpsservice now has a settings.json file in which I store "service": true/false.

    Most of the settings examples call the reload() function on the widget but really all I want to do is save the values.

    I notice that when you exit the settings App this causes the widget to be restarted.
    I dont think its a good idea to call reload() inside the draw() function.

    Is there a way to call reload() when the widget is restarted such that it determine its state and what to do ?
    Also I would ideally want to call the Bangle object to determine if GPS is on or not, rather than try and track it through variables in the widget.

  • When you change apps, everything is completely restarted - so actually I guess you don't need reload() at all - you can just read the settings in the widget once when it's first executed and everything will be fine.

    Unfortunately right now there's no way to get the state of GPS/HRM/etc in Bangle.js - I know it's a bit annoying and it's something I'm planning to add into later firmwares.

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

Whats the best way to manage widget settings that power on/off a service like GPS ?

Posted by Avatar for HughB @HughB