title: getMacAddress() is returning null
body: <p>This is the code snippet that I use</p>
  
  <pre><code>public static String getMACAddressOfDevice(Context context){
          WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
          WifiInfo wifiInfo = wifiManager.getConnectionInfo();
          String macAddress = wifiInfo.getMacAddress();
          return macAddress;
      }
  </code></pre>
  
  <p>sometime it returns null.I don't understand why !
  Can anybody explain me ?</p>