getApplicationContext issue
<p>I have VideoApplication class which extends Application class. I have created my other java class's object in this class so that I can pass it through activities.</p>

<pre><code>public class VideoApplication extends Application {
      private Client client;
      public Client getClient(){
           return client;
      }
      public void setClient(Client client){
           this.client = client;
      }
}
</code></pre>

<p>I have added following line in androidManifest file:
<code>android.name=".VideoApplication"</code>.</p>

<p>But when I add the following line to my code(MainActivity.java), the application throws a ClassCastException exception. </p>

<pre><code>VideoApplication appInstance = (VideoApplication)getApplicationContext();
</code></pre>

<p>Where am I going wrong? Please help.</p>
