Sorry you can't.  Most everything goes through Context; you'll need to pass
a Context in to your utility methods.

On Mon, Nov 30, 2009 at 8:29 AM, Mostafa <mostaf...@gmail.com> wrote:

> Hi,
>
> I want to get a system preference value in a class, but I don't have
> the context there, because the class that calls it doesn't have the
> context either. I've found that for Resources one can use the static
> Resources.getSystem() function. Is there any similar way for getting
> system preferences without context?
>
> My class isn't an activity nor service. It's a utility class. Could
> give more info if needed.
>
> --
> 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<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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