New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul Notifications & Gadgetbridge #162
Comments
Ok, I could do with some input on this... Looking into it, it feels like there's not a great deal of common code here just for Gadgetbridge - all the code (bar ~10 lines) is either handling user interaction or how stuff is rendered. So personally I think this is somewhere where abstraction doesn't help us...
Any thoughts? |
Maybe we could implement a messaging system to loose coupling between gadgetbridge infrastructure and user interaction code. The gbrigde widget could just deal with the app communication and broadcast messages. Other apps could subscribe to gbridge messages. |
The problem is we have extremely limited memory, so we don't want to be unpacking and repacking the message. The simplest way to work around this would be to just have a global However a super-simple thing to just build into each app would be:
which would work around that too, without needing any common code. |
I am up for more music controll. Things I want ( and am testing)
|
@gfwilliams sry I don't get your last js example, but the first idea works like a charm. |
My comment showed how you can chain
|
Ok, so if you look at a4ec996 I've added the workaround. If you were to just make your apps/widgets do that then they would work perfectly with each other without requiring the |
Closing this, as we're now doing chaining, we have modules for notifications, and things are working a lot better |
Merge:
Need to arrange that apps can create a
notify
module in storage, so you can then load an app from the app loader and have the scrolling notification, fullscreen notification, or any other custom notification (eg. custom look & feel)Then remove notification rendering and just
require("notify")
, which should simplify the gadgetbridge module.Also need docs :)
The text was updated successfully, but these errors were encountered: