title: Can't get app context (Unresolved reference)
body: <p>I am trying to get the context of the app to print a Toast message. The function that I use in Java is the following:</p>
  
  <pre><code>Toast.makeText(getApplicationContext(), "Hey! I'm working", Toast.LENGTH_LONG).show();
  </code></pre>
  
  <p>But now, that I need to implement it in Kotlin, (language that I'm starting to learn) feel a bit lost. I have tried the following code (given in this <a href="https://stackoverflow.com/questions/36826004/kotlin-for-android-toast">post</a>) but it doesn't work as I am not able to get the context of the app.</p>
  
  <pre><code>Toast.makeText(this@CoreMainActivity, "Its toast!", Toast.LENGTH_LONG).show()
  </code></pre>
  
  <p>Also, I am not able to get the context with <code>getApplicationContext()</code> as described in the <a href="https://developer.android.com/reference/kotlin/android/content/Context.html#getapplicationcontext" rel="nofollow noreferrer">documentation</a>.</p>
  
  <p>I would be thankful to know how to call the <code>getApplicationContext()</code>, and to understand what exactly <code>this@CoreMainActivity</code> does (in the post <code>this@CoreMainActivity</code>). <strong>Note that <code>coreMainActivity</code> is a Java file.</strong></p>
  
  <p>Thanks!</p>