On 22/05/2014 13:24, porschekoe...@googlemail.com wrote:
I'm quite new to Firefox OS. At the moment I'm struggling with implementing some kind of 
a "service" that listens for geolocation updates in the background.
If there are lots of other apps running at the same time mine seems to be 
killed by the system. When I debug with App Manager it just disconnects from 
the app silently.

I tried requestWakeLock('cpu') and the use of a Worker but without success.

requesting a wake-lock alone is not enough to keep your app alive, you also need to be waiting for some kind of system message and I'm not sure if the geolocation service counts towards that.

That being said even then nothing guarantees that your application will stay alive. If the user opens a very large foreground application pretty much all the ones in the background will be killed to make room for it if there's not enough memory - including those holding wakelocks. The only guarantee you'll have is that holding a wakelock will make it less likely for your app.

 Gabriele
_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to