Beispiel #1
0
 public static String getWifiIPv4Address(final Context pContext) throws WifiUtilsException {
   try {
     return IPUtils.ipAddressToString(WifiUtils.getWifiIPv4AddressRaw(pContext));
   } catch (final UnknownHostException e) {
     throw new WifiUtilsException("Unexpected error!", e);
   }
 }
Beispiel #2
0
 public static String getEmulatorIPAddress() throws WifiUtilsException {
   try {
     return IPUtils.ipAddressToString(WifiUtils.getEmulatorIPAddressRaw());
   } catch (final UnknownHostException e) {
     throw new WifiUtilsException("Unexpected error!", e);
   }
 }