-
Notifications
You must be signed in to change notification settings - Fork 100
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
Implement UnifiedPush #2798
base: development
Are you sure you want to change the base?
Implement UnifiedPush #2798
Conversation
In the latest version they are adding in forground service which might make this moot |
Sounds to me
Sounds to me like this is a firebase replacement more than a background service replacement. Maybe I'm wrong? But it seems like yeah, the current foreground service implementation drains battery fast, but I'm not sure how much better the true background service changes I made would improve on that. I think it does significantly, but maybe unified push is still more efficient? I still need to look at the code changes, so.. |
Precisely. No bluebubbles code needs to run in the background at all when either FCM or UnifiedPush is being used. In both cases a separate service listens for incoming push notifications and distributes notifications to the correct applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At a quick glance, the code looks all good. I'll need to do a full review of it when I have some more time. Will definitely try to get this merged for the next next release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why you are referencing a specific commit here? Maybe I'm mistaking the SHA prefix for something else... But if rather not reference a specific commit and rather, the latest stable branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There wasn't a recent release tag listed when I imported the library for development.
While I was testing my code they added a new release that I didn't see. I've made the change to import that release.
This PR implements UnifiedPush support and adds a settings page to enable and disable it.
After enabling, a target URL will be displayed in the settings. One more step is required: Open the Bluebubbles Server settings, and add a Webhook that sends New Messages events to the target URL. Push notifications will work, even after the app is killed.
On the latest release (v1.13.2), the socket service accounted for ~33% of the battery usage on mostly-idle Pixel 8 Pro. When using this branch, battery usage dropped to < 1% while receiving push notifications.
Closes #2274