I have been searching for answers regarding this problem with China phone (Oppo, Huawei, XiaoMi, Vivo, etc.) when app is swiped up (close), the background services stopped running.
Most of the solutions were:
- Include START_STICKY and use AlarmManager to start service.
- Programmatically direct user to auto-start manager to enable app by user.
- Manually exclude my app from power saving mode or include my app as protected apps.
My question is how does apps like Whatsapp still receives message or notification even swiped up? Furthermore, the solutions mentioned in 1. and 2. doesn't work if phone restarts, but how Whatsapp still can receive messages? I have tested Samsung devices, they have no problem running background services even though the app is swiped up. Has anyone face the same problem with China phone?