docs: public static boolean isConnected(Context context) {
          if (context == null) {
              return true;
          }
          ConnectivityManager cm = (ConnectivityManager) context
                  .getSystemService(Context.CONNECTIVITY_SERVICE);
          NetworkInfo info = cm.getActiveNetworkInfo();
          return info != null && info.isConnectedOrConnecting();
      }