title: How to get activity context into a non-activity class android?
body: <p>I have a Activity class from where I am passing some information to a helper class(Non-activity) class. In the helper class I want to use the <code>getSharedPreferences()</code>. But I am unable to use it as it requires the activity context.</p>
  
  <p>here is my code:</p>
  
  <pre><code>  class myActivity extends Activity
      {
      @Override
          protected void onCreate(Bundle savedInstanceState) 
          {
  
              // TODO Auto-generated method stub
              super.onCreate(savedInstanceState);
              setContentView(R.layout.home);
  
  
              Info = new Authenticate().execute(ContentString).get();
              ItemsStore.SetItems(Info);
  
          }
  
      }
  
  class ItemsStore
  {
    public void SetItems(Information info)
   {
    SharedPreferences  localSettings = mContext.getSharedPreferences("FileName", Context.MODE_PRIVATE);
              SharedPreferences.Editor editor = localSettings.edit();
              editor.putString("Url", info.Url);
              editor.putString("Email", info.Email);
   }
  }
  </code></pre>
  
  <p>ANy idea how this can be achieved?</p>