android: ConnectivityManager.CONNECTIVITY_ACTION, send broadcast when the net connected state has not changed
<p>I registered a broadcast to get ConnectivityManager.CONNECTIVITY_ACTION, code is:</p>

<pre><code>registerReceiver(mNetwrokBroadcastReceiver, new IntentFilter(
            ConnectivityManager.CONNECTIVITY_ACTION));
</code></pre>

<p>and the receiver is:</p>

<pre><code>private BroadcastReceiver mNetwrokBroadcastReceiver = new BroadcastReceiver() {

    @Override
    public void onReceive(Context context, Intent intent) {

        boolean isConnected = false;
        NetworkInfo mNetworkInfo = intent
                .getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO);
        NetworkInfo.State state = (mNetworkInfo == null ? NetworkInfo.State.UNKNOWN
                : mNetworkInfo.getState());

        switch (state) {
        case CONNECTED:
            isConnected = true;
            break;

        case DISCONNECTING:
            if (intent.getBooleanExtra(
                    ConnectivityManager.EXTRA_NO_CONNECTIVITY, false))
                isConnected = false;
            else {
                isConnected = true;
            }
            break;

        default:
            break;
        }


        if (isConnected) {
            mPopwin.onDismiss();
            init();

        }
    }
};
</code></pre>

<p>but I found when net always connected , it also send broadcast, why???
there is a same <a href="http://stackoverflow.com/questions/6670514/connectivitymanager-connectivity-action-always-broadcast-when-registering-a-rec">question</a> , I can't got it.</p>

<p>Edit:
I means, I register a broadcast that the filter is "ConnectivityManager.CONNECTIVITY_ACTION" in init of a activity, when the net has always connected, I start the activity,  the function "onReceive" executed; In <a href="http://developer.android.com/reference/android/net/ConnectivityManager.html#CONNECTIVITY_ACTION" rel="nofollow">google doc</a> said "A change in network connectivity has occurred", but there is no change in network, why execute onReceive ?</p>
