Code example for SupplicantState

Methods: equals

0
		public void onReceive(Context context, Intent intent) {
			SupplicantState state = intent.getParcelableExtra( WifiManager.EXTRA_NEW_STATE );
			 
			if( state != null ) 
			{ 
				if( state.equals(SupplicantState.COMPLETED) ) {
					onSuccessfulConnection();					 
				} 
				else if (state.equals(SupplicantState.DISCONNECTED)) {
					onFailedConnection(); 
				} 
			} 
		} 
	} 
	 
	public void onSuccessfulConnection() { 
		List<WifiConfiguration> configurations = mWifiManager.getConfiguredNetworks();
		if( configurations != null ) 
		{ 
			for( WifiConfiguration config : configurations ) 
			{