title: How to access another activity?
body: <p>Just to make it clear, <a href="https://stackoverflow.com/questions/33201330/how-to-access-list-of-fragment-from-another-activity">this</a> is not I want. I want to access another Activity's context.</p>
  
  <p>Suppose I've two activities, <code>MainActivity</code> and <code>WebActivity</code>. In <code>MainActivity</code> I used <code>oAuth2</code> login, and after login I start the <code>WebActivity</code>. In <code>WebActivity</code> I need to logout with the function <code>mTencent.logout(MainActivity.this);</code>, the question is how can I access <code>MainActivity</code> from <code>WebActivity</code>?<br/></p>
  
  <p>If I do this directly, I get the error,</p>
  
  <blockquote>
    <p>MainActivity is not an enclosing class?</p>
  </blockquote>
  
  <p>Considering I'm a starter of android, here may be not the exact way to implement it.</p>
  
  <p>Will someone help? Thank you!</p>
  
  <p>The API : <code>void com.tencent.tauth.Tencent.logout(Context context)</code></p>