docs: public static boolean isInternetAvailable(Context context) {
          ConnectivityManager connectivityManager = (ConnectivityManager) context.getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
          if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
              return isInternetAvailable(connectivityManager);
          } else {
              return isInternetAvailablePreLollipop(connectivityManager);
          }
      }