protected static boolean isConnected(){
  NetworkInfo info=getNetworkInfo();
  return (info != null && info.isConnected());
}

protected static boolean isConnected ( ) { NetworkInfo info = getNetworkInfo ( ) ; return ( info != null && info . isConnected ( ) ) ; }
check if there is any connectivity
