public class NetworkUtils
extends java.lang.Object
构造器和说明 |
---|
NetworkUtils() |
限定符和类型 | 方法和说明 |
---|---|
static java.net.InetAddress |
getBroadcast(java.net.InetAddress inetAddr) |
static java.lang.String |
getIpAddress(Context context) |
static java.lang.String |
getMacAddress(java.lang.String tag,
Context context)
获取mac地址
|
public static final java.lang.String walnmac
public static final java.lang.String ethmac
public static java.lang.String getIpAddress(Context context)
public static java.lang.String getMacAddress(java.lang.String tag, Context context)
tag
- wlan0 或者 eth0tag
- wlan0 或者 eth0public static java.net.InetAddress getBroadcast(java.net.InetAddress inetAddr)