Package 

Object NetworkManager

    • Method Detail

      • canPingGoogle

         final Boolean canPingGoogle(Integer timeout)

        Checks if device can connect to google.

        Executes on IO Dispatcher.

        Parameters:
        timeout - Time limit to check connection, must be greater than 999.
      • isWifiEnabled

         final Boolean isWifiEnabled(Context context)

        Checks if Wi-Fi state. This only checks Wi-Fi setting, not if the current Wi-Fi connection can reach internet.

        Parameters:
        context - Application, activity or fragment context.
      • isMobileDataEnabled

         final Boolean isMobileDataEnabled(Context context)

        Checks if mobile data state. This only checks mobile data setting, not if the current mobile data connection can reach internet.

        This checks active network capabilities, if Wi-Fi is enabled this method will return false.

        Parameters:
        context - Application, activity or fragment context.
      • isWifiOrMobileDataEnabled

         final Boolean isWifiOrMobileDataEnabled(Context context)

        Checks if Wi-Fi or mobile data state. This only checks Wi-Fi and mobile data setting, not if the current Wi-Fi or mobile data connection can reach internet.

        Parameters:
        context - Application, activity or fragment context.