Android Check Connectivity
Check if your app has connectivity
boolean hasConnectivity = true;
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo info = cm.getActiveNetworkInfo();
hasConnectivity = info != null
&& (info.isConnected()
|| (roamingOK && info.isRoaming()));
Written by Raúl Raja
Related protips
1 Response
and then get the network ssid and mass announce the mac address! bad android! :)
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Connectivity
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#