Reputation: 541
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?
Upvotes: 0
Views: 235