Class NetworkHelper
java.lang.Object
com.exxothermic.audioeverywheresdk.helper.logic.NetworkHelper
Helper class for network related operations
- Since:
- 12/3/13
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getIpforScanning
(android.content.Context toUse, boolean shouldProvideEthernetIfAvailable) 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 momentstatic String
refreshIpAddress
(android.content.Context toUse, android.net.NetworkInfo affectedNetwork) Get IP address from first non-localhost interface
-
Field Details
-
ETHERNET_INTERFACE_NAME
- See Also:
-
ipAddress
-
-
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 IPaffectedNetwork
- 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 appverifyOverEthernetPort
- 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)
-