Skip to content

Request to ignore battery optimizations before receiving subscription#97

Merged
binwiederhier merged 2 commits into
binwiederhier:mainfrom
p1gp1g:fix/battery_opt_req
Sep 21, 2025
Merged

Request to ignore battery optimizations before receiving subscription#97
binwiederhier merged 2 commits into
binwiederhier:mainfrom
p1gp1g:fix/battery_opt_req

Conversation

@p1gp1g
Copy link
Copy Markdown
Contributor

@p1gp1g p1gp1g commented Nov 11, 2024

This privilege is required to start a foreground service from the background. Which is what is intended to be done when the first registration is received with UnifiedPush

Fix #95

This privilege is required to start a foreground service from
the background. Which is what is intented to be done when the
first registration is received with UnifiedPush
@p1gp1g
Copy link
Copy Markdown
Contributor Author

p1gp1g commented Nov 11, 2024

By the way, I've added the possibility to change the battery settings without asking the user to do it manually in settings

I can split the PR if you prefer

@p1gp1g
Copy link
Copy Markdown
Contributor Author

p1gp1g commented May 27, 2025

I see many users struggling with errors 507. This issue should fix it.

It happens because channels are created by the client, but because it isn't allowed to run in the background without restriction, it can't start a new foreground service, and so it can't register the new topic on the server. The new endpoint is still sent to the application. And we end with a 507 error.

Examples:

@binwiederhier
Copy link
Copy Markdown
Owner

I plan to release Android after the ntfy server. I'll look at all the PRs then!

@p1gp1g
Copy link
Copy Markdown
Contributor Author

p1gp1g commented May 27, 2025

Great news !

The last comment was to add some context, I tend to forget to include it in my PRs and I saw I forget to mention the 507

@NextWork123
Copy link
Copy Markdown

I plan to release Android after the ntfy server. I'll look at all the PRs then!

Some news about that?

@binwiederhier
Copy link
Copy Markdown
Owner

Very cool. It opens a neat confirm dialog. Thanks

@binwiederhier binwiederhier merged commit 9e3d117 into binwiederhier:main Sep 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unrestricted battery usage should be requested even without registrations

3 participants