-
Sure, for example the Clock Switcher app does this.
The
Updating boot0...
is becausebootupdate.js
rewritesboot0.js
wheneversettings.json
changed, that happens automatically, no need to do it yourself.
And I thinkclockHasWidgets
is updated automatically bybootloader.js
, so you only need to updateclock
insettings.json
. -
Mostly for looking at things without needing to get my phone out:
- Date + time
- Notifications
- Currently playing song / adjust volume
- Weather
I've made a list of installed apps
- Date + time
-
I think it's important to consider what happens when someone else wants/needs¹ to modify your code: just having to worry about minification is a hassle, but if really necessary it should at least be reproducible: that way somebody can check they got the minification right before even making changes, so they know any (new) bugs aren't caused by getting the minification wrong.
¹. It doesn't happen often anymore, but sometimes e.g. library code needs a fix that also requires all the apps using it to be updated.
-
I'm not sure, but if it did change, it might have something to do with this Gadgetbridge commit?
-
Editing the "back" widget would be tricky: it's not loaded like regular widgets, but hardcoded to be inserted as the first widget by the
setUI
code. -
You can use setTimeout:
read_heading(); setTimeout(send_vibration, 300); // No brackets() after send_vibration!
-
- There is
E.on('kill')
- No, providing an appID means "I need the GPS to stay on until I turn it off", omitting it means "Turn the GPS on now, until anything turns it off"
- Apart from the active app, widgets and/or boot apps could be using the GPS.
- There is
-
It breaks because Espruino doesn't support default parameter values,
round(6800971.33999999985, 2)
works though. -
Looks like it's from the
buzz
module.
(Searching for.substr(1)
only finds a handful of matches, and this one has those constants) -
I meant we already have the code for the relay, so it shouldn't¹ be too hard to add a button to the App Loader which does the same.
So you could just open the app store in GadgetBridge and press the button to set up a relay.¹ But nothing is ever easy.
-
I think it would be very useful.
Another option would be if GagdetBridge could work as IDE relay, that might be easier to add (as first step ;-), because it wouldn't need a console UI inside the app?Actually, now I wonder if this even needs support from the app, maybe it could just be added to the app store code?
-
there is also "e.type" but i don't know what is its purpose.
It seems to be undocumented, but exactly what you're looking for:
e.type==0
for short press, ande.type==2
for long press.Edit: Only tested it on my Bangle.js 2, so it might not work on the Bangle.js 1. Also doesn't seem to work in the emulator.
-
Another solution: I created an app that sends the battery level to Home Assistant, which controls a Shelly plug with the charger.
I think you want to add a
custom.html
: that can open a dialog when uploading the app, ask for those settings, and send them to the watch.Looks like hasensors does pretty much the thing you want: asks for a bunch of values, then replaces
{placeholders}
in the code. (Except you probably don't needboot.js
, and want to adjust yourapp.js
instead of using a separatelib.js
file)