Code example for WifiInfo

Methods: getSupplicantState

0
		Context context = Director.getInstance().getContext();
		if(context.checkCallingOrSelfPermission(android.Manifest.permission.ACCESS_WIFI_STATE) == PackageManager.PERMISSION_GRANTED) {
			WifiManager wm = (WifiManager)context.getSystemService(Context.WIFI_SERVICE);
			if(wm != null) {
				WifiInfo info = wm.getConnectionInfo();
				return info != null && info.getSupplicantState() == SupplicantState.COMPLETED;
			} else { 
				return false; 
			} 
		} else { 
			Log.w("libwiengine", "you need add ACCESS_WIFI_STATE permission");
			return false; 
		} 
	} 
	 
	/// get network type 
	static int getNetworkType() { 
		NetworkType type = NetworkType.NONE;
		 
		if(isWifiConnected()) {