Package 

Interface Network


  • 
    public interface Network
    
                        

    The interface to work with network settings.

    Required: Started AdbServer 1. Download a file "kaspresso/artifacts/adbserver-desktop.jar" 2. Start AdbServer => input in cmd "java jar path_to_file/adbserver-desktop.jar" Methods demanding to use AdbServer in the default implementation of this interface are marked. But nobody can't deprecate you to write implementation that doesn't require AdbServer.

    • Method Summary

      Modifier and Type Method Description
      abstract Unit enable() Enables wi-fi and mobile data using adb.
      abstract Unit disable() Disables wi-fi and mobile data using adb.
      abstract Unit toggleMobileData(Boolean enable) Toggles only mobile data.
      abstract Unit toggleWiFi(Boolean enable) Toggles only wi-fi.
      • Methods inherited from class com.kaspersky.kaspresso.device.network.Network

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • enable

         abstract Unit enable()

        Enables wi-fi and mobile data using adb.

      • disable

         abstract Unit disable()

        Disables wi-fi and mobile data using adb.

      • toggleMobileData

         abstract Unit toggleMobileData(Boolean enable)

        Toggles only mobile data. Note: it works only if flight mode is off.

      • toggleWiFi

         abstract Unit toggleWiFi(Boolean enable)

        Toggles only wi-fi. Note: it works only if flight mode is off.