BroadcastReceiver for mobile data
<p>I have this BroadCastReceiver for listening to changes in the <code>WiFi</code> state:</p>

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

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

        int extraWifiState = intent.getIntExtra(
                WifiManager.EXTRA_WIFI_STATE,
                WifiManager.WIFI_STATE_UNKNOWN
                );

        wifiState = new WifiState(Main.this);

        switch (extraWifiState) {

        case WifiManager.WIFI_STATE_DISABLED:
            wifiState.haveNetworkConnection();
            break;

        case WifiManager.WIFI_STATE_ENABLED:

            ConnectivityManager conMan = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
            while (conMan.getActiveNetworkInfo() == null
                    || conMan.getActiveNetworkInfo().getState() != NetworkInfo.State.CONNECTED) {

                wifiState.cancelDialog();

            }
            break;
        case WifiManager.WIFI_STATE_ENABLING:
            break;
        case WifiManager.WIFI_STATE_UNKNOWN:
            break;
        }
    }
};
</code></pre>

<p>How can I add support for listening to mobile data in this broadcastreceiver, aswell? </p>

<p>Thanks in advance, guys! </p>
