-
That should automatically have installed the Message UI app ("Messages"), which contains music controls.
(I'm assuming you already installed Gadgetbridge on your phone and connected it to your watch)
-
gbmusic
should work if you only want to control media, but maybe have a look at Android Integration first, for more extensive Android support (including music). -
-
I think you're looking for the
lock
event -
I haven't found a way to have the console up when connected to GB.
Instead of connecting to GB, you could send fake messages manually in the console:
GB({"t":"musicinfo","artist":"Some Artist Name","album":"The Album Name","track":"The Track Title Goes Here","dur":241,"c":2,"n":2}) GB({"t":"musicstate","state":"play","position":0,"shuffle":1,"repeat":1})
-
var getData = require('Storage').read('rawData.csv\1');
This only reads chunk 1 of the Storage file, see here for an explanation about those.
You probably want something like this:
var dataFile = require('Storage').readopen('rawData.csv', 'r'); var line = dataFile.readLine(); while (line != undefined) { Bluetooth.println(`<data>\n${line}\n</data>`); line = dataFile.readLine(); } dataFile.erase();
Also:
var memory = require("Storage").getStats();
Shouldn't this be
var memory = require("Storage").getFree();
? -
Actually, we might get away with just making it an attribute, and only calling
Volley.newRequestQueue
for the very first request (and cleaning it up indispose
). That way there is no need to sprinklestop
over all response/error handler code, and we don't need a full-blown singleton class either.Looking at 400-line switch statements makes me itchy though, so I'll try to submit a PR with some refactoring Soon, and include a fix for this.
edit: PR
-
I wonder if it's related to Volley.newRequestQueue - maybe that should just be called once?
I think that's it: looking at this, we should either call
stop()
on the queue once we have a response, or set up a singleton. Otherwise every request leaves a new "thread pool" lying about.If you just need to make a one-time request and don’t want to leave
the thread pool around, you can create theRequestQueue
wherever you
need it and callstop()
on theRequestQueue
once your response or
error has come back, using theVolley.newRequestQueue()
method
described in Sending a Simple Request. But the more common use case is
to create theRequestQueue
as a singleton to keep it running for the
lifetime of your app, as described in the next section.(Calling
stop()
seems by far the easiest solution.) -
I'm using Weather Notification myself (It's briefly mentioned at the bottom of the app readme), but wouldn't recommend it.
(In 2020 it still looked maintained, and QuickWeather wasn't an option. Guess I'm just lucky that it kept working for me.) -
-
Yes, if you put that code in a boot file it should work, except you also want to check that
type === 'text'
: only show notifications/smsmsg.t !== 'remove'
: only show new/modified messages
The messages library README has some example code using
E.showMessage()
. -
setFontMono(bool)
That seems like a good idea (maybe also add
setFontMono(int width)
?)g.setFontSize(...)
That looks good. (and font packs could override
Graphics.prototype.setFontSize
)try and find a font that would display the given text in the area. It might be good for messages...
On the one hand: that seems overly complicated. I think messages should just use a fixed size and handle overflow: that will happen anyway, and showing short messages in a larger font doesn't seem worth the hassle. (with variable character size, I think we'd need to "try all sizes until one fits", not sure that is a good idea¹)
On the other hand: if authors really want to use it, we don't want apps to "roll their own" if Bangle could do it for them.¹ even though I wrote that code myself, regretting it now 😉
-
A new font format seems interesting, especially if you could add e.g. emojis.
I don't get how it would be smaller than indexed bitmaps though?
Edit: oh, variable width and just a \n after the last black pixel per line would help.I guess sometimes you still want to pick an exact font, for e.g. clock layouts? Maybe add
Bangle.selectFont(size)
, and it gives you the best font to use for that size? Custom "font packs" could then override that function.
Seems a bit clunky thoughg.setFont(Bangle.selectFont('30px'));
:-( -
For me it's always kind of hard to tell from pictures instead of the real watch, but I think it looks good in the menu bar.
To me it looks just too small/large in the scroller, but we could maybe resize scroll items?say: "I want a bitmap font 20px high" and let Espruino choose?
This would be nice to have. (And people could customize fonts globally without messing up layouts.)
-
-
I don't have Signal installed.
Could you maybe install messagesdebug, and post the log after you get some broken messages? -
-
Do you want to add it to the main app loader now it can go in without conflicting?
I've still got some items on my TODO list before I'd feel happy adding it to the public app store.
Shouldn't take too long though: now the library stuff is sorted out, I'm planning to mostly just remove/disable Stuff, and it can be added/fixed/improved later.have some code in the app loader to automatically uninstall 'conflicting' apps first?
I hadn't thought of that, but maybe we should indeed have that first:
For the initial installation just saying "UninstallMessage UI
, then install this app" in the README seems fine, but (un)installing differentmessagegui
apps can lead to Interesting problems later on if anybody gets the order wrong. -
Updated to reflect recent changes (message library, fast loading)
I also renamed it to "Message List"(messagelist
), it now lives here, as alternative tomessagegui
: installation procedure is now simply- Install default message library/apps
- Uninstall "Message UI"(
messagegui
) - Install "Message List"(
messagelist
)
(After the initial installation you can skip step 1+2 when "updating".)
- Install default message library/apps
-
-
or
setUI({back})
on Bangle.js 1 ends up being a bit uselessI don't think it's quite that bad: touching the left-hand side of the screen works fine, and most apps do use the buttons anyway. But for those that don't, it would be nice if this worked.
BTN2 seemed natural, but now you mention BTN3, that would make sense
short-press: go back
long-press: go all the way back -
Right, I can see why we want to avoid changing Bangle.setUI.
But as far as I can tell on Bangle.js 1:
Bangle.setUI({mode:"clock",back:function() { Bangle.showClock(); }});
opens the launcher (instead of the clock) when you press the middle button.
And
Bangle.setUI({mode:"custom",back:function() { Bangle.showClock(); }});
does nothing for button presses.
So we end up needing something like this:
Bangle.setUI({mode:"custom", back: function() { // Bangle.js 2 also calls this for button presses Bangle.showClock(); }, btn: global.BTN2 ? function(b) { if (b==2) Bangle.showClock(); // only needed for Bangle.js 1 } : undefined });
Bangle.js 2
setUI
checks if there are any button listeners, and assigns theback
function otherwise, Bangle.js 1 doesn't :-(Maybe we could add similar code to the Bangle.js 1
setUI
:Bangle.on("touch", touchHandler); if (Bangle.btnWatches===undefined) // only add back button handler if there are no existing watches btnWatch = setWatch(function() { btnWatch = undefined; options.back(); }, BTN2, {edge:"falling"}); ... // and in widget.remove: if (btnWatch) clearWatch(btnWatch);
But I suppose that would lead to the same problem of it not working in older firmware... (On the other hand: it doesn't work now either, so apps that already assign their own BTN2 listeners should be fine?)
-
I'm not really sure I understand the reasoning behind making the weather app behave differently to every other app (going to launcher instead of the clock)
Probably because I just copied it from some clock code without thinking too much about it ;-)
And after that we just kept preserving existing behaviour, which is how we ended up withBangle.setUI("clock");delete Bangle.CLOCK;
my preference would be to make 'back' go back to the clock.
Yes, I agree.
Maybe we should even add aBangle.setUI("app")
mode, where the middle button goes back to the clock?
You can log GadgetBridge messages using the Messages Debug app.
Music state is tricky as there is quite some variety in what info various media players report (and even when). That is e.g. why the watch updates the current music info when it gets a new message, instead of completely throwing away old info. I can definitely see that messing things up when there are multiple player notifications.
I haven't looked at the Gadgedbridge music code, but I'm thinking maybe it could be changed to include the name of the media player.