WifiManager my_wifiManager = ((WifiManager) getSystemService("wifi"));
DhcpInfo dhcpInfo = my_wifiManager.getDhcpInfo();
String ip=intToIp(dhcpInfo.gateway);
非常简单
DhcpInfo dhcpInfo = my_wifiManager.getDhcpInfo();
String ip=intToIp(dhcpInfo.gateway);
非常简单