title: android: how to use getApplication and getApplicationContext from non activity / service class
body: <p>I'm using extending application class on Android to share my data across the entire app.</p>
  
  <p>I can use <code>getApplication()</code> method from all my activities.</p>
  
  <p>However, there are certain custom helper classes I created; for example, an <code>XMLHelper</code> class which does not inherit from any activity / service class.</p>
  
  <p>Here the <code>getApplication()</code> method is not available.</p>
  
  <p>How do I sort this out and what are the best design practices to solve this?</p>