Replies: 1 comment 1 reply
-
Afaik mobile is really restrictive about running code in the background. You might need to use some OS-provided API to schedule code to run in the background (and even that has been a bit hit-or-miss when I tried it in Flutter) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to do polling on HTTP requests and trigger a notification when something has changed.
So I tried doing this that way :
and I listened to events in the JS code and I did
sendNotification
in the front-end like this :However, I'm not receiving any notification when I close the app (not killing it but just closing it) while I do receive them when the app is currently active.
I know I can add Kotlin code to make a worker that could poll and create the notification in background, but that would make me rewrite the JS code I have in Kotlin and probably Swift for iOS.
The intention here is to have the exact same code and make it work everywhere...
Any idea ? Maybe this is a feature idea ?
Also FCM is not possible in this case so the new
push-notification
plugin that is currently in progress will probably be no use in there.Thanks !
Beta Was this translation helpful? Give feedback.
All reactions