Code example for WifiInfo

Methods: getSSID

0
		if (isOnline(context)) {
			WifiManager wifiManager = (WifiManager) context
					.getSystemService(Context.WIFI_SERVICE);
			WifiInfo wifiInfo = wifiManager.getConnectionInfo();
 
			String ssid = wifiInfo.getSSID();
			if (ssid == null) {
				return false; 
			} 
			if (ssid.contains("HSR-Secure")) {
				return true; 
			} 
		} 
		return false; 
	} 
} 
Contextual code suggestions in your IDE  Get Codota for Java