I have to get the name and password of my mobile hotspot programmatically in android studio. How do I do it?
WifiManager wifiManager = (WifiManager) getApplicationContext().getSystemService(WIFI_SERVICE);
WifiInfo wifiInfo = wifiManager.getConnectionInfo();
Toast.makeText(this,"SSID:"+wifiInfo.getSSID(),Toast.LENGTH_LONG).show();
This code gives me SSID of wifi I am connected to. I need name of my Mobile hotspot.