Android Wifi Address Get getDeviceUDID(Context context)

Here you can find the source of getDeviceUDID(Context context)

Description

Obtain device wifi mac address(UDID)

Declaration

public static String getDeviceUDID(Context context) 

Method Source Code

//package com.java2s;
import android.content.Context;

import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;

public class Main {
    /**/*from   w ww.  j ava  2s  .  c  o  m*/
     * Obtain device wifi mac address(UDID)
     * 
     * @author Sean Zheng
     * @CreateDate 2013-4-24
     */
    public static String getDeviceUDID(Context context) {
        WifiManager wifi = (WifiManager) context
                .getSystemService(Context.WIFI_SERVICE);
        WifiInfo info = wifi.getConnectionInfo();
        return info.getMacAddress();
    }
}

Related

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