Over the last couple months we’ve noticed some issue with delayed notifications on some Huawei devices.
In this article we will explain the issue, the cause and some possible fixes.
This is a known issue with Huawei devices and is being caused by the battery manager and the way it’s trying to save battery.
There are couple settings that can help.
On Android 5 and lower:
- Change the power plan to “normal” under settings → power saving
- Add the app as protected App under settings → Protected apps
On Android 6 and higher:
- Change the power plan to “normal” under settings → general settings
- Add the app as protected App
Change the optimization setting under settings → apps → advanced → ignore battery optimizations
To investigate this issue further we wrote an application to test delayed notifications on Huawei devices and also on other devices for references. The project can be found under Github.
The relevant code for this test case and delayed notifications are the following.
If you experience similar issues feel free to discuss in the comments.