docs: private boolean isNetworkOnline(Context context) {
          try {
              ConnectivityManager cm =
                      (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
              if (cm == null ) {
                  // lets be optimistic, if we are truly offline we handle the exception
                  return true;
              }
              @SuppressLint("MissingPermission") NetworkInfo netInfo = cm.getActiveNetworkInfo();
              return netInfo != null && netInfo.isConnected();
          } catch (Throwable ignore) {
              // lets be optimistic, if we are truly offline we handle the exception
              return true;
          }
      }