katzer / cordova-plugin-background-mode

Keep app running in background
Apache License 2.0
1.38k stars 1.02k forks source link

Javascript does not work in the background #257

Open srsarcasmo opened 7 years ago

srsarcasmo commented 7 years ago

I have an application that requires sending data to a web service, I'm using javascript setinterval, and my app what it does is send the data well for 6 minutes but then the set interval stops paused and until the phone finds a good Internet connection sends lso data but not in the established time

`function foreground (){ document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { cordova.plugins.backgroundMode.enable(); cordova.plugins.backgroundMode.isActive();

} }`

Harshad111 commented 7 years ago

but java can ...

https://taco.visualstudio.com/en-us/docs/createplugintutorial/