I use the following code to get BSSID:
public static String getBSSID(Context context) {
WifiManager wifiMgr = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
return wifiMgr.getConnectionInfo().getBSSID();
}
When i use this code when the device doesn't have sim card it works fine. But when i have a sim card, even when i am using wifi - me returned value is 00:00:00:00:00:00. Anybody knows why it happens?