I am trying to make an Android Module and get WiFi SSID inside the module.
However, the
getApplicationContext()
in
WifiManager wifiManager = (WifiManager) getApplicationContext().getSystemService (Context.WIFI_SERVICE);
WifiInfo info = wifiManager.getConnectionInfo ();
String ssid = info.getSSID();
function doesn't work inside the module.
How can I get the WiFi SSID string in an Android Module?