I can't see how it would be causing your symptoms, but I'd suggest NOT
doing any DNS lookups in a broadcast receiver. It's a blocking
operation, so even though it's *usually* fast, I'd suggest passing the
operation off to a service to handle if possible. I've seen lots of
applications on multiple platforms suffer from poor responsiveness due
to doing DNS resolution in the main UI thread. It's the sort of
problem that's often not caught in testing, because it's usually so
fast, until one day it's not.

On Mar 16, 6:06 pm, Jason Proctor <jason.android.li...@gmail.com>
wrote:
> hey all,
>
> something weird just started happening. my app has a broadcast
> receiver which may access the network when invoked. the code has been
> solid for ages, but in the last few days it has started gettingDNS
> errors on perfectly fine hosts. these are hosts which can be reached
> without problems in the main app or from other apps.
>
> interestingly i've seen another app getDNSerrors too -- another app
> with a broadcast receiver.
>
> seems to affect all OS versions -- we have 1.5, 1.6, and 2.01 here. i
> don't have a Nexus to test 2.1, though.
>
> are there caveats to doing network inside broadcast receivers? i
> didn't think so, as ours worked fine until.... the time change [fx:
> twilight zone theme]
>
> thanks for any guidance with this one!
> --
> jason.vp.engineering.particle

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

Reply via email to