You can allow a certain app to run in the background by going to Settings > Apps & notifications > Advanced > Special app access > Battery optimization . This will initially show you the apps which are Not Optimized – that is, the ones that can run in the background even while the phone is sleeping.
Read moreShould I limit background processes android?
By limiting the background process, users tell the operating system not to run in the background and keeps on eating unnecessary resources . Notably, limiting background process simply puts all the background process to sleep but that does not mean notification from email, WhatsApp, etc won’t be delivered.
Read moreWhat is Android background service?
A background service performs an operation that isn’t directly noticed by the user . For example, if an app used a service to compact its storage, that would usually be a background service.27 Eki 2021
Read moreHow do I run background services in Android 11?
Broadcast Receiver for Android 11 is background process. Solution: You need to get ACCESS_BACKGROUND_LOCATION for your app . Even when using foreground service. The same foreground service will work without having this permission if user stars it manually from your app (e.g. clicking record button in your app).
Read more