In Settings > General Settings, Background activity shows Allowed or Not allowed.
What it controls
Whether Android may stop the app in the background to save battery. When the app is stopped, notifications can be missed and alarms can't ring.
Steps
- Tap Background activity.
- Tap Allow in the Android dialog.
- If it shows Already allowed, you're done.
Also check
On Samsung, Xiaomi, Huawei, Oppo, Realme and Vivo phones there are extra settings. See "How to stop your phone from closing Notification Tracker".