Java tutorial
//package com.java2s; import android.content.Context; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; public class Main { public static boolean checkWIFI(Context cxt) { WifiManager wifi = (WifiManager) cxt.getSystemService(Context.WIFI_SERVICE); if ((wifi.isWifiEnabled() == true)) { WifiInfo wifiInf = wifi.getConnectionInfo(); /* Get the MAC ADD of WIFI */ // Commons.MAC_ID = wifiInf.getMacAddress(); return true; } else { return false; } } }