Back to Top

Continue downloads with screen off

6 posts / 0 new
Last post
kanis
Offline
Last seen: 10 years 11 months ago
Joined: 02/17/2009 - 21:26
Continue downloads with screen off

For a few days I've been wondering why I set Snoggdoggler to download podcasts, I watch the percentage increasing, I turn off the screen and check again a few minutes later and it's downloaded more, but if I leave it doing this overnight, it's hardly downloaded anything. Apparently it's because the default behavior of Android is to turn off the CPU (which turns off WiFi) soon after the screen has been turned off, even when plugged in to external power. Therefore, it would be great if Snogg could maintain a "partial wake lock" (see http://groups.google.com/group/android-beginners/browse_thread/thread/fb... ) on the CPU as long as it's downloading episodes. I would recommend it do this when it's in the foreground, and have a preference to let it also do it when in the background.

Until then I guess the solution is to leave the screen on all night while it downloads, but I have a feeling the screen backlight doesn't have an infinite life.

eric
Offline
Last seen: 1 year 9 months ago
Joined: 11/06/2008 - 22:02
Wake locks

Take a look at this part of the manual - http://www.snoggdoggler.com/?q=node/66.

Are you pressing the hang-up button to turn off the screen?
Also, are you on wifi or cell?

We do keep locks when downloads are occurring. It may be useful to install logcat and see what's happening in the logs. Take a look at the faq (http://www.snoggdoggler.com/?q=node/8) for logcat.

Once you start a download, it should complete without letting the phone sleep unless you are having network connection problems. Are you seeing anything in the notifications pane?

kanis
Offline
Last seen: 10 years 11 months ago
Joined: 02/17/2009 - 21:26
I'm using an Android Dev

I'm using an Android Dev Phone 1 with no cellular data plan, so it's always on wifi. I connect it to the wall charger, leave Snogg on the Manage Queue screen so I can see an episode is downloading, then tap hangup briefly to turn off the screen (I have the screen set not to turn off by timeout when plugged in). If I leave it like this overnight, few episodes have downloaded in the morning.

One possibility is that Snogg will let the CPU sleep if it's having problems downloading something. In my latest test it was trying to download ten episodes where apparently the server was down and so it would slowly try and fail to start the download five times on each episode before removing each from the queue. It's possible that it got stopped on this bad batch each night I've seen this happen... though it seems unlikely.

Today I left it downloading with the screen on and it finally managed to get everything in the queue except those ten bad episodes. The bad server is now up and it's downloading those episodes and I've turned off the screen and will send you the log if it stalls. Do you know exactly how long it waits to turn off the CPU with screen off?

eric
Offline
Last seen: 1 year 9 months ago
Joined: 11/06/2008 - 22:02
Bad server

I takes about 2m:45s from the time the screen goes completely dark to go to sleep.

What should happen when there are failed downloads is that after five retries, the failing one get removed from the queue. The queue should continue processing the remaining files until there are no more in the queue.

I would really be surprised if you were having sleep issues. We had some early on but those have long since been resolved.

If something turns up in the logs, let me know.

eric
Offline
Last seen: 1 year 9 months ago
Joined: 11/06/2008 - 22:02
Looks like a bug

Kanis emailed me the logs and it seems that if you have "only wifi" configured and you have a download failure, the phone goes to sleep, the wifi turns off, then there's no wifi, so no more downloads occur. When you wake the phone, the downloads are still in the queue.

Thanks kanis for helping troubleshoot this one. I'll see if I can get a fix out shortly.

kanis
Offline
Last seen: 10 years 11 months ago
Joined: 02/17/2009 - 21:26
I checked back about ten mins

I checked back about ten mins later and upon turning it on with menu and menu (no pattern lock) I saw the wifi symbol had disappeared and Snogg said wireless was disconnected and was on try 2 of 5 downloading. I failed to notice if it was still trying to download the episode I'd left it on, but judging by how long it takes per episode, I doubt it had finished and thus I think it turned off wifi during the download. Maybe you can tell from the log I got, although it doesn't seem to have times attached which makes it hard to correlate.

Also, these are video podcasts, in case that matters.

I'm going to email you the log through the contact form.