尽管在版本9(Pie)之前仍然可以正常工作,但在Android 10中杀死应用程序后,WorkManager无法正常工作 [英] WorkManager not working when app killed in Android 10 although working fine till version 9 (Pie)

查看:290
本文介绍了尽管在版本9(Pie)之前仍然可以正常工作,但在Android 10中杀死应用程序后,WorkManager无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我的应用程序被Android 10中的后台任务杀死时,我没有通过workmanager收到通知时,我发现了这个问题.

I figured out this issue when I wasnt getting the notification through workmanager when the app was killed from background tasks in Android 10.

直到Andorid 9,所有的android版本都可以正常工作.为了对此进行测试,我同时在9和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.

还有其他人也面临这个问题吗?我在网上搜索,但没有针对基于Andorid 10的问题的支持解决方案.

Is someone else also facing this issue? I searched the web but no support solution for Andorid 10 based issue.

注意:在打开应用程序并触发工作管理器后,我会在10分钟内收到通知,但在应用程序完全完成时不会收到通知关闭.另外,我已经在Android 10的Google Pixel设备上测试了这种情况,但没有成功.

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.

推荐答案

在android世界中存在着巨大的碎片.后台任务管理是最糟糕的情况,因为它在不同设备中的行为会有所不同.请阅读下面的文章以获得更好的理解.

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.

这篇关于尽管在版本9(Pie)之前仍然可以正常工作,但在Android 10中杀死应用程序后,WorkManager无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆