title: Static like methods in Android application with kotlin
body: <p>I am trying to add a "static" method to my MyApplication class in kotlin
  I have added (as a property) the variable : </p>
  
  <pre><code>private var context: Context? = null
  </code></pre>
  
  <p>in method: </p>
  
  <pre><code>override fun onCreate()
  </code></pre>
  
  <p>I added: </p>
  
  <pre><code>context = applicationContext
  </code></pre>
  
  <p>then I add a companion object like this</p>
  
  <pre><code>companion object {
      @JvmStatic fun getMyApplicationContext(): Context?
      {
          return MyApplication().context
      }
  }
  </code></pre>
  
  <p>when I call this method from other parts of the application like
  <code>MyApplication.getMyApplicationContext()</code> it always returns null. I have gleaned all this from several sources but I am not sure if it is anywhere near correct or not.</p>