Android Wifi Address Get getWifiMacAddress()

Here you can find the source of getWifiMacAddress()

Description

get Wifi Mac Address

Declaration

public static String getWifiMacAddress() 

Method Source Code

import java.io.InputStream;
import cn.bingoogol.dmc.App;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.NetworkInfo.State;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.net.wifi.WifiManager.MulticastLock;
import android.os.Environment;
import android.widget.Toast;

public class Main{
    public static String getWifiMacAddress() {
        WifiManager wifi = (WifiManager) App.getInstance()
                .getSystemService(Context.WIFI_SERVICE);
        WifiInfo info = wifi.getConnectionInfo();
        return info.getMacAddress();
    }//from   w  w w.  j a  va  2 s . co m
}

Related

  1. getDeviceUDID(Context context)
  2. getDeviceUniqueIdentificator( @Nonnull Context context, @Nonnull String appId)