title: Using this.getApplicationContext(); with multiple application classes
body: <p>In my app i need to store the location to firebase so im using two location classes as application because i need to store location for two different entities</p>
  
  <p>First Application class</p>
  
  <pre><code>public class FirstApplicationClass  extends MultiDexApplication implements  GoogleApiClient.ConnectionCallbacks,
      GoogleApiClient.OnConnectionFailedListener,
      LocationListener{ 
  }
  </code></pre>
  
  <p>Second Application Class</p>
  
  <pre><code>public class SecondApplicationClass extends FirstApplicationClass implements GoogleApiClient.ConnectionCallbacks,
      GoogleApiClient.OnConnectionFailedListener,
      LocationListener {
  }
  </code></pre>
  
  <p>Below is manifest.xml code</p>
  
  <pre><code>&lt;application
      android:name=".location.SecondApplicationClass"
      android:allowBackup="true"
      android:icon="@mipmap/ic_launcher"
  </code></pre>
  
  <p>i need to use this.getApplicationContext(); in both the case, in the second case where i am using the Second application class, i am able to use  this.getApplicationContext(); from the specific activity i.e,</p>
  
  <pre><code>mSecondApplicationClass = (SecondApplicationClass) this.getApplicationContext();
  </code></pre>
  
  <p>and able to store the location.
  I dont know how to use this.getApplicationContext(); with the First Application Class, i.e,</p>
  
  <pre><code>mFirstApplicationClass = (FirstApplicationClass) this.getApplicationContext();
  </code></pre>
  
  <p>i am unable to  achieve this</p>