java.lang.Object
com.exxothermic.audioeverywheresdk.helper.logic.NetworkHelper

public class NetworkHelper extends Object
Helper class for network related operations
Since:
12/3/13
  • Field Details

  • Constructor Details

    • NetworkHelper

      public NetworkHelper()
  • Method Details

    • refreshIpAddress

      public static String refreshIpAddress(android.content.Context toUse, android.net.NetworkInfo affectedNetwork)
      Get IP address from first non-localhost interface
      Parameters:
      toUse - Context for the app, used to receive the connection manager and check for the IP
      affectedNetwork - the network that send the request for the new IP
      Returns:
      IP Address on the interface, either Ethernet or Wifi
    • isConnected

      public static boolean isConnected(android.content.Context toUse, boolean verifyOverEthernetPort)
      Helper method used on the library to know if the device is connected to a WLAN at any moment
      Parameters:
      toUse - context to do the scan, and used to obtain the device information from the app
      verifyOverEthernetPort - indicates if the ethernet connection must be scanned for use or not
      Returns:
      true if a LAN is detected, either Wireless or Ethernet. False otherwise
    • getIpforScanning

      public static String getIpforScanning(android.content.Context toUse, boolean shouldProvideEthernetIfAvailable)