0

I want to fetch my Hotspot's SSID. I Implemented below code

 WifiManager wifiManager = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
 Method getConfigMethod = wifiManager.getClass().getMethod("getWifiApConfiguration");
 WifiConfiguration  wifiConfig = (WifiConfiguration) getConfigMethod.invoke(wifiManager);
 final String ssid = wifiConfig.SSID;

which gives me an error java.lang.SecurityException: App not allowed to read or update stored WiFi Ap config (uid = 11529)

YeO
  • 938
  • 1
  • 9
  • 17

1 Answers1

0

java.lang.SecurityException: You‘re probably missing the permissions the activity needs in the manifest.

GabeRAMturn
  • 350
  • 1
  • 5
  • 10