WorkManager not working when app killed in Android 10 although working fine till version 9 (Pie)

点点圈 提交于 2021-02-07 06:34:22

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!