> 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 dig through a lot of articles, posts and forums to find an elegant way of uploading a file to a server, I was just thinking it could be a simple "add that class to your project" type of thing. So I just wanted to do it right. So thats my design consideration. > Try looking at the source code to the connectivity subsystem someday, > and then try telling me it is "simple". I can feel I upset you, and i'm sorry, i should have been more careful with my words. 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 it is connected to the internet. Actually, i think i just thought of a reason just writing this sentence : Permissions may be ? Our applications need a special permission in its manifest to check the network state. Ok make sense, then sorry. > > > Isn't there something like class.parent.getContext or simply a way to > > get access to those crucial components without having a context ? > > No. Ok well, i guess i'll have to dig deepper in the Context leak/soft hook/garbage collection thing then :D Thanks for your time Mark. I now know where I stand. Best Regards -- 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

