Service and Activity inherit from Context - so when you call getSystemService in these classes, you really call super.getSystemService .
If you want Context be available in another class, you can pass it as an argument to the method of this class, save a link to it, etc.
Edit : sample code. But seriously, it is extremely simple - if you understand inheritance and methods.
class MyActivity extends Activity {
Jean Hominal Nov 10 '10 at 5:52 2010-11-10 05:52
source share