On Fri, Sep 24, 2010 at 1:43 AM, Mystique <[email protected]> wrote:

>  "The method getSharedPreferences(String, int) is undefined for the type
> EventsData".
>
> Does it mean I need to extend both SQLLiteOpenHelper and Activity?
>

It means the the method you are trying to use, getSharedPreferences(String,
int), is not a declared method of the class you're using it in, in this case
"EventsData".

You cannot use a method in a class if it's not defined for that class.


> How to do that or how to fix this?
>

Probably just pass a context, the sharedpreference object, or the preference
value itself to your function from wherever you're calling "ABC".

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