问题
I figured out this issue when I wasnt getting the notification through workmanager when the app was killed from background tasks in Android 10.
It is working fine for all the android version till Andorid 9. To test this, I run the app simultaneously on both 9 and 10 versions.
Is someone else also facing this issue? I searched the web but no support solution for Andorid 10 based issue.
Note: As soon as the app is opened and the workmanager is triggered, I get the notification in 10 but not when the app is completely closed. Also, I have tested this scenario on Google Pixel device as well for Android 10 but no success.
回答1:
There is vast fragmentation in the android world. The background task management is the worst scenario as it will behave different in different devices. Please read the post below to get better understanding.
- https://medium.com/mindorks/enable-background-services-in-chinese-roms-32e73dfba1a6
- http://pguardiola.com/blog/darealfragmentation-alarms/
来源:https://stackoverflow.com/questions/63147401/workmanager-not-working-when-app-killed-in-android-10-although-working-fine-till