Whats the best way to manage widget settings that power on/off a service like GPS ? #2299
Unanswered
espruino-discuss2
asked this question in
Bangle.js
Replies: 1 comment
-
Posted at 2021-01-14 by @gfwilliams When you change apps, everything is completely restarted - so actually I guess you don't need 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. |
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
-
Posted at 2021-01-14 by HughB
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.
Beta Was this translation helpful? Give feedback.
All reactions