title: How to fetch the connected Wifi name?
body: <p>I have used the below code for fetching the Wifi name in android. Below is the code that i have used:</p>
  
  <pre><code>WifiManager wifiManager = (WifiManager) mContext.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
         WifiInfo info;
         if (wifiManager != null &amp;&amp; isWebViewLoaded) {
             info = wifiManager.getConnectionInfo();
             String wifiName = info.getSSID();
  }
  </code></pre>
  
  <p>The code works on other devices (below version 8), however I tried on Nexus 5X (Oreo v-8.1), it gives "Unknown SSID" against info.getSSID().</p>