title: BroadcastReceiver receives multiple identical messages for one event
body: <p>I registered a receiver that listens to network events:</p>
  
  <pre><code>&lt;receiver 
      android:label="NetworkConnection"
      android:name=".ConnectionChangeReceiver" &gt;
      &lt;intent-filter &gt;
          &lt;action android:name="android.net.conn.CONNECTIVITY_CHANGE" /&gt;
      &lt;/intent-filter&gt;
  &lt;/receiver&gt;
  </code></pre>
  
  <p>receiver is also very simple:</p>
  
  <pre><code>public class ConnectionChangeReceiver extends BroadcastReceiver {
      @Override
      public void onReceive(Context context, Intent intent) {
          ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
          NetworkInfo activeNetInfo = connectivityManager.getActiveNetworkInfo();
          if (activeNetInfo != null) {
                  Log.v("@@@","Receiver : " + activeNetInfo);
          } else {
              Log.v("@@@","Receiver : " + "No network");
          }
      }
  }
  </code></pre>
  
  <p>The problem is, when Wifi is connected I receive 3 identical messages in a row, like this:</p>
  
  <pre><code>Receiver : NetworkInfo: type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), roaming: false, failover: false, isAvailable: true
  Receiver : NetworkInfo: type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), roaming: false, failover: false, isAvailable: true
  Receiver : NetworkInfo: type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), roaming: false, failover: false, isAvailable: true
  </code></pre>
  
  <p>They are all "CONNECTED/CONNECTED" (Shouldn't they be something like CONNECTING/OBTAINING_IPADDR, etc.), so the problem is how do I tell when It's really connected? I have some routines that I want to make when wifi is actually connected, and I dont want them to be called three times in a row. </p>
  
  <p>PS: 3G sends only one message, so no problem here.</p>
  
  <p>Update: </p>
  
  <p>Seems like it's device specific problem.</p>
  
  <p>For test I took 2 Desire HD, and 4 random android phones(different Aquos models and some no-name chinese stuff). On both DHD and one random phone on wifi connect I got 3 messages, on remaining phones I got only one message. WTF.</p>