Closed ghost closed 9 years ago
try this background plugin, it will prevent app from pause:
Thanks. It worked.
Here is what I have done:
config.xml
<gap:plugin name="de.appplant.cordova.plugin.background-mode" />
<gap:config-file platform="ios" parent="NSLocationAlwaysUsageDescription" overwrite="false">
<array>
<string>Enable file sharing (allow local server to run in background)</string>
</array>
</gap:config-file>
javascript
navigator.geolocation.getCurrentPosition(function(){ /* to trigger location prompt */
window.plugin.backgroundMode.enable(); /* enable background mode */
});
Hi,
The server stops working (is paused) when the app is put in background mode (switching to another app).
Is it possible to have it running when the app is paused?
Thanks,
Michael