title: Broadcast Receiver calles twice
body: <p>Trying to check Internet connection in my app. 
  There is a code of my manifest: </p>
  
  <pre><code>    &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
          &lt;receiver android:name=".MyReceiver" &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>And there is a handle class: </p>
  
  <pre><code>public class MyReceiver extends BroadcastReceiver {
  
  @Override
  public void onReceive(Context context, Intent intent) {
      if(intent.getAction() != null &amp;&amp; intent.getAction().equals("android.net.conn.CONNECTIVITY_CHANGE"));
      {
          Log.d("myLogs", "Network connectivity change");
          if (intent.getExtras() != null) {
              NetworkInfo ni = (NetworkInfo) intent.getExtras().get(
                      ConnectivityManager.EXTRA_NETWORK_INFO);
              if (ni != null &amp;&amp; ni.getState() == NetworkInfo.State.CONNECTED) {
                  Log.i("myLogs", "Network " + ni.getTypeName() + " connected");
              }
          }
          if (intent.getExtras().getBoolean(
                  ConnectivityManager.EXTRA_NO_CONNECTIVITY, Boolean.FALSE)) {
              Log.d("myLogs", "There's no network connectivity");
          }
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>In my Logcat i get a picture like a: </p>
  
  <pre><code>04-11 23:24:48.021: D/myLogs(10261): Network connectivity change
  04-11 23:24:48.021: I/myLogs(10261): Network WIFI connected
  04-11 23:24:48.202: D/myLogs(10261): Network connectivity change
  04-11 23:24:48.202: I/myLogs(10261): Network WIFI connected
  </code></pre>
  
  <p>So, receiver called twice. Why? There is some problem with all types of connections.</p>