I see some applications like Messenger, Zalo do not need notifications but still work in the background. How to do it. The devices I use are Xiaomi A1 (Android 8) and Nokia 6.1
No, you cannot start a service to work in the background when app is not in the foreground without showing the foreground notification API >= Oreo. I suggest you use WorkManager, a convenient lib for background tasks without foreground notification. Check it out there: Work manager