Object CustomNetworkValidator

  • All Implemented Interfaces:

    
    public class CustomNetworkValidator
    
                        

    CustomNetworkValidator is a utility class to validate the network connectivity using DNS request. Has a debounce time of 1 sec to avoid multiple requests. Has a cache expiry time of 30 secs for not validated network and 2 mins for validated network.

    NetworkCapabilities.VALIDATED flag not coming in all devices, so using this to emulate similar behavior.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final ErrorCode getInternetReachabilityError(Network network)
      final Unit reset()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait