On Fri, Jun 10, 2011 at 1:32 AM, Heikki <[email protected]> wrote:
> Everything else sounds pretty clear, but the incoming network data
> wakeup is still a bit fuzzy. Consider for example doing a synchronous
> HTTP request with HttpClient or some other library. Probably you would
> have to acquire the wakelock for the whole duration of the HTTP
> request?

If you are on WiFi, probably, and perhaps a WifiLock as well. Not sure
about mobile data.

> The solution there is to release the wakelock just before sending the
> request, and re-acquire it after the HttpResponse has been received.
> This apparently works in practice, but I'd really like to understand
> why it wouldn't fall asleep right after releasing the wakelock. Is
> there a reason, or is it just relying on good luck?

That's well outside my area of WakeLock expertise, sorry.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android 3.0 Programming Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to