The Better Way of Determining Internet Connectivity
Originally a question about why a web view was failing when a broadcastReceiver said the device was connected to the internet: WebView Fails w/ Good Connection This lead to two answers, a technically correct and a workaround. However, neither is perfect. My question is: What is the better way of determining a valid internt connect? (1) public static boolean isConnectedToInternet() { ConnectivityManager cm = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); boolean isConnected = false; if(activeNetwork != null &&