title: Get intent from broadcast receiver to activity
body: <p>I want my <code>activity class</code> to receive an intent from <code>broascast Receiver</code> (example <code>START_TALKING</code>, <code>STOP_TALKING</code>). And when I receive that <code>intent</code>, I want to check what action was being passed. How can I do this. My receiver is in separate class, it's <code>public</code>. </p>
  
  <p>Here's my code</p>
  
  <pre><code>public void onReceive(Context context, Intent intent)
  {
      if (Intent.ACTION_MEDIA_BUTTON.equals(intent.getAction())) {
          KeyEvent event = intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT);
                  switch (event.getKeyCode()) {
      case KeyEvent.KEYCODE_HEADSETHOOK:
          if (action == KeyEvent.ACTION_DOWN)
              // here I want to notify my activity class (e.g.      startActivity? I don't know)
          break;
      case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
          // here I want to notify my activity class (e.g.      startActivity? I don't know)
                }
      }
  }
  </code></pre>
  
  <p>I really need your help guys tnx.</p>