How to use getApplication of and Activity class to store my of Value in non Activity class in the ActivityClass
<p>I have develop an app, in which i have an created a global Activity class which stores all my list and boolean varaiable which can be use in any Activity class and also in non activity class. but when i want to use the <code>getApplication()</code> in my non activity class it gives me error .</p>

<p>the sample code
This is my Application which has all the list and boolean variables to be used</p>

<pre><code>public class MyApplicationData extends Application
{
    public  String USER_ID = "";
        public  double user_latitude;
        public  double user_logitude;

        // for password
        public  boolean remember_password = false;
        public ArrayList&lt;Integer&gt;value= new ArrayList&lt;Integer&gt;();
}
</code></pre>

<p>I have Another class which is  non Activity where i want to use my list to save some data
For your reference here is sample code</p>

<pre><code>public class Test
{    
    public MyApplicationData myApplicationData;
    GetApplication getApplicationData ;
    @Override
    public void characters(char[] ch, int start, int length) throws SAXException 
    {
        super.characters(ch, start, length);
        String data = new String(ch,start,length);
        if(in_userid)
        {
            XMLData.user_info_map.put("userid",data);
            Log.v("--: PARSED DATA :-- MAP"+i, "userid = "+data);
        }
        if(in_firstname)
            {
            XMLData.user_info_map.put("firstname",data);
            Log.v("--: PARSED DATA :-- MAP"+i, "firstname = "+data);

        }
     } 
 } 
</code></pre>

<p>I have class which extends <code>Activity</code></p>

<pre><code>public class GetApplication extends Activity
{
  public MyApplicationData getTheApplication()
  {

      return (MyApplicationData)getApplication();
  }
}
</code></pre>

<p>I am stuck here can any one help how to store values using Application you help will be highly obliged</p>
