title: Get application context from non activity singleton class
body: <p>In my android project, I have ImageAdapter class in which I pass app context for some further needs.</p>
  
  <pre><code>public class ImageAdapter extends BaseAdapter {
      private Context c;
  
      public ImageAdapter(Context c) {
              this.c = c;
      }
      ...
  }
  </code></pre>
  
  <p>The problem is that I wanna make ImageAdapter as a singleton to have an easy access to the instance of this class from all of my activities. But I have no idea how to pass app context from getApplicationContext() method from one of my activities to ImageAdapter. So is there any "magic" to do that as follows?</p>
  
  <pre><code>public class ImageAdapter extends BaseAdapter {
  
      private Context c;
  
      private static class Holder {
              public static final ImageAdapter IA = new ImageAdapter();
      }
  
      private ImageAdapter() {
              this.c = /* some magic here */.getApplicationContext();
      }
  
      public static ImageAdapter getInstance() {
              return Holder.IA;
      }
      ...
  }
  </code></pre>
  
  <p>Maybe you have some other ideas for sharing ImageAdapter for any of my activities.
  I'm a newbie to android and I'm a little bit confused with the ways of passing data among activities.</p>
  
  <p>I will be grateful for any help.</p>