androidjs
androidjs copied to clipboard
app's javascript 'stops' when another app gets focus
'myapp' functions normally when it has 'focus', But when you activate another app (for example a brower). the front (index.html) and back (main.js) of myapp stops (so main.js doesn't keep on running in the background). But myapp's webview isn't closed. When you click on myapp, you see a blank page followed by index.html being reloaded and main.js restarting
have you restricted your apps to be running in background?
No, I use story-app as a template and modify main.js. I haven't modified package.json, etc
then it might be a bug, we'll look into it. join our slack community too, for faster responses. Slack Channel for support and discussion
It doesn't stop immediately but after about 30 seconds. I've tried using setTimeout to send messages between front and back every second but that has no effect. It looks like the OS stops the front and back processes. When the app gets focus again, it starts with a white screen after which view.html is loaded.
further is it possible to use wake_lock to keep cpu running?
It is not the phone which goes to 'sleep'.
Has anyone managed to resolve this issue?