title: Getting Main Activity from Main Application
body: <p>I have the following manifest.</p>
  
  <pre><code>&lt;application
      android:name=".MyMainApplication"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name" &gt;
      &lt;activity
          android:name=".MyMainActivity"
          android:label="@string/app_name" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p>I also have the following global static function.</p>
  
  <p><code>MyMainApplication application = MyMainApplication.instance();</code>as technique described in <a href="https://stackoverflow.com/questions/987072/using-application-context-everywhere">Using Application context everywhere?</a></p>
  
  <p>I was wondering, out from <code>application</code> variable, is it possible for me to get <code>MyMainActivity</code>?</p>