title: Android: How to get context of calling activity in an IntentService?
body: <p>If I call</p>
  
  <pre><code>Intent intent = new Intent(ReadingActivity.this, AdService.class);
  startService(intent);       
  </code></pre>
  
  <p>from within the <code>onCreate</code> method of <code>MyActivity</code> class, how do I get access to <code>MyActivity.this</code> from inside the <code>onHandleIntent()</code> method of the <code>IntentService</code> class</p>
  
  <pre><code>@Override
  protected void onHandleIntent(Intent arg0) {
      // TODO Auto-generated method stub
      ((BookLib) getApplication()).createAd(I need to pass the calling activities context here);
  }
  </code></pre>