[android-developers] Re: Check for internet connection inside an anonymous class

2009-12-30 Thread Hekki
Hekki wrote: Since i'm in an anonymous class and I've read that it's not a good idea to pass the whole context to classes Where did you read that? I sure hope that I did not write that... Thanks for your answer. Since I'm not sure I fully understand that Context leak thing, I just try to

Re: [android-developers] Re: Check for internet connection inside an anonymous class

2009-12-30 Thread Mark Murphy
Hekki wrote: Since I'm not sure I fully understand that Context leak thing, I just try to avoid it alltogether : http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/ Just be careful where and how you hold onto a Context. But to the point : I'm trying to make my code as

[android-developers] Re: Check for internet connection inside an anonymous class

2009-12-30 Thread Hekki
Reuse is a design consideration, but only *a* design consideration. Possible Context leaks are another design consideration. If you will ! My idea behind this is that when released into the wild open source, a component like that has to be as independent as possible, plug-and-play. I've had to

Re: [android-developers] Re: Check for internet connection inside an anonymous class

2009-12-30 Thread Mark Murphy
Hekki wrote: Simple was a shortcut for Should be a really easy task to achieve by developers on a platform designed around the 'always connected' idea. And the four lines of code you need to do it are easy enough, I admit, but i can still not see why I need to have a context to ask the OS if