Most recent activity
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 the
need it and call
RequestQueueonce your response or
error has come back, using the
described in Sending a Simple Request. But the more common use case is
to create the
RequestQueueas a singleton to keep it running for the
lifetime of your app, as described in the next section.
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/sms
msg.t !== 'remove': only show new/modified messages
The messages library README has some example code using
That seems like a good idea (maybe also add
That looks good. (and font packs could override
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 though
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.)
Actually, we might get away with just making it an attribute, and only calling
Volley.newRequestQueuefor the very first request (and cleaning it up in
dispose). That way there is no need to sprinkle
stopover 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.