On Sun, Mar 27, 2011 at 10:16 AM, Kostya Vasilyev <kmans...@gmail.com>
 wrote:

> 27.03.2011 19:05, TreKing пишет:
>
>>  Do you have a good example of when storing a Context like this is a good
>> idea? I'm just curious.
>>
> I do. Singletons.
>
>>
> Or, to use a more simple name, "manager" or "utility" classes that provide
> reusable functionality, which needs to be available to more than one Android
> application component.


Do you have something more concrete? :-)
Any Singleton, manager, or utility class can take Context as a parameter for
the functions it needs it for, making it clear to the user of the API that a
Context is needed for that functionality. In this case is seems storing the
Context is merely a convenience to avoid parameters in functions.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 
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