Skip to content
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

Use permanent Notification for background service #83

Closed
ChaosNicro opened this issue Feb 18, 2023 · 3 comments
Closed

Use permanent Notification for background service #83

ChaosNicro opened this issue Feb 18, 2023 · 3 comments

Comments

@ChaosNicro
Copy link

Heya, thanks for providing this.

I happen to have a few apps using notifications for staying awake. Though FossWarn seems to not use the commonly used permanent notification call for it's status. Compared to the others, I can swipe the status away and have done so by accident a few times. This seems to kill the service, since I stop receiving alerts until I fully close and reopen the app. Is this the intended behaviour?
I would expect the notification to not be removable unless disabled in settings.
Cheers

@nucleus-ffm
Copy link
Owner

FOSS Warn does not currently use a foreground service that requires a permanent notification. FOSS Warn uses an alert manager that wakes FOSSWarn after a certain period of time. If you turn off the notification, it should have no effect on functionality.
What makes me curious is the fact that you write that you won't get alerts if the notification is not displayed. Are you sure about that? If the notification is displayed, does it update periodically? If you cancel the notification, it should be displayed again at the next background update. (so by default 15 minutes)

But thanks for pointing that out. I have now added the attribute "ongoing" to the status notification. So with the next version you won't be able to cancel it accidentally.

@ChaosNicro
Copy link
Author

ChaosNicro commented Feb 19, 2023

I can't say for certain. I distinctly had the situation before posting this, where it was storming outside and I was wondering why there were no alerts. I opened the app to find that there were a couple for the place I set. I checked Androids and FossWarns notification settings to find them all enabled and confirmed that battery optimization was off. The App might have simply not been running for some reason. As long as I'm the only case, there is nothing to worry about. Close this if you like.

@nucleus-ffm
Copy link
Owner

This is not good to hear. Please keep an eye on this. For the next situation, please always check if the release date is newer than the last update. Sometimes it just takes a few more minutes and there would be a notification.

If you notice the same problem again, please open another issue.

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

No branches or pull requests

2 participants