android - How to check internet access? -
so, question how check if receiving data or not. scenario connected wifi network such starbucks wifi (which user should first connect network , accept agreement before receiving data.) code not serving 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 connected network have not accepted agreement yet. thanks,
there's no way know that, because isn't handled @ os level- handled @ router. os knows whether has completed handshake router , received ip. whether router going throw him login screen beyond scope of os.
Comments
Post a Comment