Cordova Plugin Background Mode - Cordova 12 #465
Replies: 1 comment
-
Just to give you an answer, I don't use any "background modes" but I can give some insight on why there might be a lack of a response or lack of available (or perhaps working) plugins. Depending on what you want to do, running background JS tasks may not be possible or reliable. On iOS for example, WKWebView does not process any JS events (the engine itself is effectively paused) while the app is in the background. Android does allow backgound processing of the webview however it's not guarenteed. Depending on the vendor and device's available resources the OS may restrict processing time of the application when it's in in the background, or the OS may even kill it. On Android, allowing background JS execution in the webview is more of a request and if the user is using another resource-expensive app, the OS will likely not give your app any CPU time. In native programming, android and iOS has special constructs that allows you to run background tasks on behalf of an application, that can run independently of your application process, even if the process was killed or closed. These constructs however tends to have limitations, like not having access to the UI, which the webview requires. In theory, it is possible to launch a background JS environment that is external the webview (known as |
Beta Was this translation helpful? Give feedback.
-
Hello !
Anyone already used any "cordova-plugin-background-mode" ?
If "yes", which one ?
Thanks !!
Beta Was this translation helpful? Give feedback.
All reactions