List of usage examples for android.net ConnectivityManager bindProcessToNetwork
public boolean bindProcessToNetwork(@Nullable Network network)
From source file:com.mobilyzer.util.PhoneUtils.java
public void unregisterNetworkCallback() { if (connectivityNetworkCallback != null) { ConnectivityManager cm = ((ConnectivityNetworkCallback) connectivityNetworkCallback) .getConnectivityManager(); cm.bindProcessToNetwork(null); cm.unregisterNetworkCallback(connectivityNetworkCallback); connectivityNetworkCallback = null; }//from w ww . j a va 2 s.c om }