So, my question is how to check if I am receiving any data or not. The scenario is that I am connected to a wifi network such as Starbucks wifi (which user should first connect to the network and then accept the agreement before receiving any data.) This code is not serving my purpose.
ConnectivityManager cm =
(ConnectivityManager) _mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo netInfo = cm.getActiveNetworkInfo();
if (netInfo != null && netInfo.isConnected()) {
return true;
}
return false;
It returns true when I am connected to the network but I have not accepted the agreement yet. Thanks,