tags:

views:

24

answers:

1

Hi all. Hopefully someone can give me a pointer. I have an application that makes several web service calls. I'm in the middle of a refactor and I've pulled the actual calls out to a new class. The problem is that I can't seem to use:

SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); or TelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);

within my class. I'm not extending anything, so I suppose the problem is that I don't have the application context. Is there a good base class that I should be extending to be able to use these or some secret to it?

A: 

pass application context to this new class' constructor.

bhups
You are now my hero. thank you.
Mark Freeman