On Mon, Oct 11, 2010 at 2:01 PM, Dimitris <[email protected]> wrote:
> The context class is abstract. When you say context do you mean an
> Activity context? I suggest you look at the Application class (see
> getApplicationContext()) and pass that instead. It is much much safer
> from memory leaks rather than passing the Activity around.

Bear in mind, though, that the Context returned by
getApplicationContext() is not going to be suitable in all cases. I
and others have run into problems with this related to UI operations.

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

Android Training...At Your Office: http://commonsware.com/training

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