>
> public static Context mContext;
>
Why are you making this static?

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Mon, May 7, 2012 at 3:11 AM, Jason Teagle <[email protected]> wrote:

>  try mContext = this;
>>
>
> That would then be an activity context, not an application context.
> Although it might work for the case required (I doubt it - see below),
> there are reasons for using one over the other.
>
> http://android-developers.**blogspot.co.uk/2009/01/**
> avoiding-memory-leaks.html<http://android-developers.blogspot.co.uk/2009/01/avoiding-memory-leaks.html>
>
>
> It also doesn't help solve the problem of why the OP is getting a
> NullPointerException when trying to use the context they collected (if that
> is the actual problem they are getting).
>
> Note the first line of the second paragraph:
> http://developer.android.com/**guide/topics/providers/**
> content-providers.html<http://developer.android.com/guide/topics/providers/content-providers.html>
>
> "When you want to access data in a content provider, you use the
> ContentResolver object in your *application's* Context"
>
>
>
> --
> 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<[email protected]>
> To unsubscribe from this group, send email to
> android-developers+**[email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>
>

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