title: CONNECTIVITY_ACTION intent received twice when Wifi connected
body: <p>In my app I have a <code>BroadcastReceiver</code> that is launched as a component through a <code>&lt;receiver&gt;</code> tag, filtering <code>android.net.conn.CONNECTIVITY_CHANGE</code> intents.</p>
  
  <p>My goal is simply to know when a Wifi connection was established, so what I am doing in <code>onReceive()</code> is this:</p>
  
  <pre><code>NetworkInfo networkInfo = intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO);
  if(networkInfo.getType() == ConnectivityManager.TYPE_WIFI &amp;&amp; networkInfo.isConnected()) {
      // Wifi is connected
  }
  </code></pre>
  
  <p>It works fine, but I always seem to get two identical intents within about one second when a Wifi connection is established. I tried to look at any info I could get from the intent, the <code>ConnectivityManager</code> and <code>WifiManager</code>, but I can't find anything that distinguishes the two intents.</p>
  
  <p>Looking at the log, there is at least one other <code>BroadcastReceiver</code> that also receives the two identical intents.</p>
  
  <p>It is running on a HTC Desire with Android 2.2</p>
  
  <p>Any idea why I seem to get a "duplicated" intent when Wifi connects or what the difference between the two might be?</p>