title: Receiving same intent broadcast multiple times but only sending once
body: <p>I have an intent that gets sent under a certain condition.  The logs prove it is only sent ONCE, but the receiver is receiving it multiple times milliseconds apart.</p>
  
  <pre><code>10-01 10:09:59.201: I/System.out(13543): SENDER CHECKPOINT  
  10-01 10:09:59.211: I/System.out(13543): RECEIVER CHECKPOINT 
  10-01 10:09:59.291: I/System.out(13543): RECEIVER CHECKPOINT 
  </code></pre>
  
  <p>I have confirmed that there is only ONE registration of the Broadcast Receiver and only ONE action filter used with the registered BR. It is only used in a single activity where a service running in another thread broadcasts the intent.  Again, the logs substantiate the ONE broadcast and multiple receipts.  What's more, the extras are null in the echo receipt. </p>
  
  <p>How can this be?  Is it possible the OS is echoing it?</p>
  
  <p>Code that sends the broadcast:</p>
  
  <pre><code>private void sendBroadcast(boolean status, String message, String action){
       System.out.println("SENDER CHECKPOINT");
  
       Intent intent = new Intent(action);
       Bundle bundle = new Bundle();
       bundle.putBoolean("status", status);
       bundle.putString("message", message);
       intent.putExtras(bundle);
       sendBroadcast(intent);
  
  }
  </code></pre>
  
  <p>Code that receives the broadcast:</p>
  
  <pre><code>private class displayUpdate extends BroadcastReceiver {
  
      @Override
      public void onReceive(Context context, Intent intent) { 
              System.out.println("RECEIVER CHECKPOINT");
  
  
      };
  }
  </code></pre>
  
  <p>Registration:</p>
  
  <pre><code>@Override
  public void onResume() {
      super.onResume();
  
      try {
          // just in case onResume is called w/o a pause  
          try{activity.unregisterReceiver(displayReceiver);}catch(Exception e){}
  
          filterRefreshUI = new IntentFilter(REFRESH_UI);
          activity.registerReceiver(displayReceiver, filterRefreshUI);
  
      } catch (Exception e) {
          e.printStackTrace();
      }
  
  }
  </code></pre>
  
  <p>Unregistration:</p>
  
  <pre><code>@Override
  public void onPause() {
      super.onPause();
      try{unregisterReceiver(displayReceiver);}catch(Exception e){} 
  }
  </code></pre>
  
  <p>REALLY IT'S THAT SIMPLE!  Yet the receiver fires TWICE!</p>
  
  <p>In case you were wondering - Registration/Unregistration are handled in the onPause/onResume to prevent leaking memory if the App is killed by the OS.</p>