mc73 Well-Known Member Licensed User Longtime User Aug 7, 2012 #1 today I've noticed a very interesting update of the popular app 'wifi fixer' which is claimed to continue pinging the router even if device is in sleep. any ideas how we can do this?
today I've noticed a very interesting update of the popular app 'wifi fixer' which is claimed to continue pinging the router even if device is in sleep. any ideas how we can do this?
thedesolatesoul Expert Licensed User Longtime User Aug 7, 2012 #2 You can use a partial wakelock to make sure your service is running. Upvote 0
mc73 Well-Known Member Licensed User Longtime User Aug 7, 2012 #3 thedesolatesoul said: You can use a partial wakelock to make sure your service is running. Click to expand... Thank you. I am aware of this function, still, then, what's the meaning of 'deep' sleep if we can still have our sevices running? Just in doubt, but I will very soon get to check in a 24h testing and of course I will post my findings here Upvote 0
thedesolatesoul said: You can use a partial wakelock to make sure your service is running. Click to expand... Thank you. I am aware of this function, still, then, what's the meaning of 'deep' sleep if we can still have our sevices running? Just in doubt, but I will very soon get to check in a 24h testing and of course I will post my findings here
thedesolatesoul Expert Licensed User Longtime User Aug 7, 2012 #4 mc73 said: Thank you. I am aware of this function, still, then, what's the meaning of 'deep' sleep if we can still have our sevices running? Just in doubt, but I will very soon get to check in a 24h testing and of course I will post my findings here Click to expand... Sure do post you findings The problem i have as well is testing in deep sleep, what does that mean? i dont really know but to me it seems like a state which allows you to turn off wifi, cpu etc off (but radio in standby otherwise you will miss calls?), but it seems device dependent too. My device seems to go in deep sleep after a couple of hours (maybe its the kernel that sets this), and I often experience crashes of my app when it wakes up. From what I have read so far, if you use the Alarm Manager/Broadcast Receiver to schedule your service to run, when your device is in deep sleep, it will wake up for a moment and then go back to sleep unless you set a Partial Wakelock, which will then keep the device awake until you turn off the wakelock. Upvote 0
mc73 said: Thank you. I am aware of this function, still, then, what's the meaning of 'deep' sleep if we can still have our sevices running? Just in doubt, but I will very soon get to check in a 24h testing and of course I will post my findings here Click to expand... Sure do post you findings The problem i have as well is testing in deep sleep, what does that mean? i dont really know but to me it seems like a state which allows you to turn off wifi, cpu etc off (but radio in standby otherwise you will miss calls?), but it seems device dependent too. My device seems to go in deep sleep after a couple of hours (maybe its the kernel that sets this), and I often experience crashes of my app when it wakes up. From what I have read so far, if you use the Alarm Manager/Broadcast Receiver to schedule your service to run, when your device is in deep sleep, it will wake up for a moment and then go back to sleep unless you set a Partial Wakelock, which will then keep the device awake until you turn off the wakelock.
mc73 Well-Known Member Licensed User Longtime User Aug 7, 2012 #5 Yes, this is the info I got too. What I will do, is to set a timer in my service, it will write to the storage every, say 1 minute, some data, containing also the precise hour-minute-second. This way - hopefully - we'll know if the service is running uninterrupted during deep sleep, since if we see gaps in data writing, probably it will mean we have interruptions. Upvote 0
Yes, this is the info I got too. What I will do, is to set a timer in my service, it will write to the storage every, say 1 minute, some data, containing also the precise hour-minute-second. This way - hopefully - we'll know if the service is running uninterrupted during deep sleep, since if we see gaps in data writing, probably it will mean we have interruptions.
mc73 Well-Known Member Licensed User Longtime User Aug 31, 2012 #6 Hello, it's been a while since I've opened this thread, but today I had a bit of time for experimenting with partialLock. Putting a very unstable (concerning its wifi behavior) device into a partialLock, and inserting a 60sec interval timer in a module, just to ping the router, I got pleasantly surprised by the result: 6 hours of lock, with the device set to 'deep' sleep (no clicks, no nothing), with just one missed ping! Attached the log which includes the connection trials every minute (well that was an approximation), just in case anyone find this interesting. Attachments tmr.txt tmr.txt 12.8 KB · Views: 497 Upvote 0
Hello, it's been a while since I've opened this thread, but today I had a bit of time for experimenting with partialLock. Putting a very unstable (concerning its wifi behavior) device into a partialLock, and inserting a 60sec interval timer in a module, just to ping the router, I got pleasantly surprised by the result: 6 hours of lock, with the device set to 'deep' sleep (no clicks, no nothing), with just one missed ping! Attached the log which includes the connection trials every minute (well that was an approximation), just in case anyone find this interesting.
thedesolatesoul Expert Licensed User Longtime User Sep 1, 2012 #7 I have started to use PartialWakelock too. It works great to keep my service alive in deep sleep so that it can finish a download/upload. However, the tricky bit is to make sure that you turn off the wakelock so you dont consume unnecessary power. Upvote 0
I have started to use PartialWakelock too. It works great to keep my service alive in deep sleep so that it can finish a download/upload. However, the tricky bit is to make sure that you turn off the wakelock so you dont consume unnecessary power.
mc73 Well-Known Member Licensed User Longtime User Sep 1, 2012 #8 Sure it is. I do this at service_destroy since my server requires constant connectivity ability. Now, to be honest, I didn't notice much of an overload in battery consumption, but surely it must have some negative effect. Upvote 0
Sure it is. I do this at service_destroy since my server requires constant connectivity ability. Now, to be honest, I didn't notice much of an overload in battery consumption, but surely it must have some negative effect.
thedesolatesoul Expert Licensed User Longtime User Sep 1, 2012 #9 True, depends on your usage. On ICS, if you goto Settings>Battery, and click on your app (if its there), it tells you how long your app 'Keep Alives' the CPU. Upvote 0
True, depends on your usage. On ICS, if you goto Settings>Battery, and click on your app (if its there), it tells you how long your app 'Keep Alives' the CPU.