dealing with application context
<p>I'm new to android and java.</p>

<p>I'm rearranging some of the classes in my app into separate class files.  I had a onLocationListener class in my main activity class file.  I moved the class to a separate java class file.  Then, however the following code will not compile . . .</p>

<pre><code>public void onProviderDisabled(String provider)
{
     Toast.makeText( getApplicationContext(),
     "Gps Disabled",
     Toast.LENGTH_SHORT ).show();
}
</code></pre>

<p>The getApplicationContext won't compile when this code is in a separate file. I tried <em>this.</em> and <em>mainactivityname.</em> but nothing seems to work.  So I suppose this problem can be formed into a the following question:</p>

<p>How do you state the application context from code that exists in separate java class files outside the main activity file?
thanks, Gary</p>
