While diving deeper into my openHAB installation, the need for notifications on mobile phones came up. After some research, I settled with Pushover, which provides Android and iOS apps, as well as Desktop notifications. openHAB Rules have support for Pushover, and everything works well together.
Except when Android decides to kill apps, because they sit idle and do nothing. It so happens on my Huawei phone that notifications are delivered to the device, but no popup shows up. Only when I open the up, suddenly all the messages are there. The Pushover FAQ has an entry for this, even for Huawei phones, but it is outdated.
After another research it turns out, that the battery management in Android is at fault - but it can be disabled.
Go into system settings, and select “Battery”:
In the following screen, select “Battery usage”:
In the “Software” category, scroll until you find the “Pushover” app:
And click on it. The “Launch” setting should be “Manage automatically”:
Click on it, this setting must be changed. In the following screen, tick the “Manage automatically” slider:
The “Manage automatically” setting should be off now, but don’t touch the other three settings:
That’s it. Android will no longer try to kill this app “automatically”.