title: Using the IF statement to see what intent started the activity - ANDROID
body: <p>Hopefully this is very simple.</p>
  
  <p>I have a central activity that can be launched from two separate classes. I was hoping that in this central activity I could have an IF statement like</p>
  
  <pre><code>if(this.getIntent() == MainMenu.class)
  { 
   // Do something here
  }
  </code></pre>
  
  <p>But obviously that isn't legal so how could I structure an expression to check from what class an intent was started. </p>
  
  <p>Many thanks</p>