class NetworkStateTracker extends ConstraintTracker<NetworkState> {

    @Override
    public void startTracking() {
        if (isNetworkCallbackSupported()) {
            Log.d(TAG, "Registering network callback");
            mConnectivityManager.registerDefaultNetworkCallback(mNetworkCallback);
        } else {
            Log.d(TAG, "Registering broadcast receiver");
            mAppContext.registerReceiver(mBroadcastReceiver,
                    new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
        }
    }

    public  NetworkStateTracker(Context context);

}