Code example for WifiManager

Methods: reconnect

0
			if(wifi.isConnected()) {
				FileLog.appendLog("Wifi state is CONNECTED"); 
				return true; 
			} 
			 
			if(wifiManager.reconnect()) {
				FileLog.appendLog("Wifi successfully reconnected"); 
				return true; 
			} 
			 
			FileLog.appendLog("Wifi failed to reconnect"); 
			return false; 
		} 
		catch(Exception ex) {
			Log.w(
				this.getClass().getSimpleName(), 
				"Unable to determine WIFI state - widget cannot be refreshed."); 
			return false; 
		} 
	} 
}