Thanks, actually i need to access the shared preference in a class
that extends from BroadcastReceiver, how can i call the context then?

On Jul 9, 4:21 pm, Mika <[email protected]> wrote:
> getSharedPreferences is defined in Context. Service is a Context also.
>
> On Jul 9, 9:08 am, Jeruliu <[email protected]> wrote:
>
> > Dear all,
>
> > I need to access the shared preference in a background service instead
> > of activity on phone boot up.
>
> > But getSharedPreferences function is define in the activity, so how
> > can i access the data without creating the activity?
>
> > Thanks.

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