7

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.

Prajwal Waingankar
  • 2,534
  • 2
  • 13
  • 20
  • 2
    Any solution? Facing the same issue – Constantin N. Jul 29 '20 at 20:41
  • one difference in logs i noticed is that when the app is killed from background tasks, The workmanager doWork() is not called due to which the issue is coming. Trying to fix that. Pls do upvote the ans to attract more people for the solution if u r facing the same issue then. – Prajwal Waingankar Jul 30 '20 at 11:58
  • The exact same problem.. Please any solution for this?! – Aziz Dec 21 '20 at 06:36
  • Is your device by chance in power saving mode? See https://stackoverflow.com/questions/66030482/how-can-a-closed-application-perform-periodic-work-with-workmanager-on-android-1/66066051#66066051. – Benjamin Bihler Feb 05 '21 at 15:32
  • Can you please add code or more detail to this question. What sort of notification? What behavior are you seeing and which version of WorkManager are you using? – Ben Weiss Nov 04 '21 at 15:20

1 Answers1

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.

abdul rehman
  • 250
  • 2
  • 8