Open qbait opened 2 years ago
@qbait can you please take logs using pidcat
or adb logcat
and post them here? Also, a sample project would be super useful. Finally, please send details on your phone, OS etc.
Facing same issue when app is closed, callbackDispatcher is not called when app is closed. when we reopen the app than callbackDispatcher is triggered.
Same issue
Same issue.
Same issue.
Any updates?
The same problem, if the task is not executed for a long time, the task will be executed immediately after starting the APP.
use corn package
same issue for me. after i put the device to idle
Same problem. @ened Will any work be put towards this issue in the near future ?
Same issue
I mean, this completely breaks the functionality of the plugin. If it's not triggering when I have the app closed, what is this whole thing good for? Why isn't any of this being worked on, is the whole project abandoned?
Is no work going to be done on this? currently this package provides 0 advantage as we can simply run cron
if we wanted to schedule stuff. I thought this would actually work without relying on whether is app is open or not? Atleast the oneOffTask
should have consistent behavior.
As I found out, at least on Android this is the expected behavior.
I switched to background_fetch, which works pretty well. That being said I can however confirm the previous statement from TheCarpetMerchant. The user closing the app ultimately means "do not ever run this application in the background". Plus every OEM producing Android adds some extra energy saving algorithm that reduces/prevents background execution. That's a limitation none of the plugins can avoid.
Are there any updates about this issue?
I did some tests for my app, on 7 Android devices, from Android 5 to Android 14. From my obervations, the behaviour depends only on the manufacturer, not on code or Android version. (It even looks like Android < 7 has a periodicity very accurate, while after, the OS becomes more smart to fluctuate +/- minutes compared to the theoric duration).
Same conclusions by other people here : https://stackoverflow.com/questions/55349488/work-manager-not-working-when-app-is-killed-by-the-user-why
The background task is executing as expected as long as the app is open, however, when I close the app (not minimize). The background task finishes too.
Sample code:
Tested on the physical device. Pixel 2, Android P