title: How to get Application from Context
body: <p>Is there a way I can get application from Context. I noticed that activity and service has getApplication() method but Context does not.</p>
  
  <p><strong>Background:</strong></p>
  
  <p>I am using/extending the GCMBaseIntentService and the</p>
  
  <pre><code>protected abstract void  onMessage (Context context, Intent intent) 
  </code></pre>
  
  <p>gives me a context as a parameter. I would like to get the Application object so I can downcast it to MyApplication and retrieve some variables </p>
  
  <p>Thanks</p>