List of usage examples for android.net.wifi WifiConfiguration INVALID_NETWORK_ID
int INVALID_NETWORK_ID
To view the source code for android.net.wifi WifiConfiguration INVALID_NETWORK_ID.
Click Source Link
From source file:com.mstar.tv.tvplayer.philips.option.OptionFirstFragment.java
private boolean isWifiConnected() { WifiManager wifiManager = getWifiManager(); // wifi is disabled if (!wifiManager.isWifiEnabled()) { return false; }// w ww . j a va2 s. co m // wifi have not connected WifiInfo info = wifiManager.getConnectionInfo(); if (info == null || info.getSSID() == null || info.getNetworkId() == WifiConfiguration.INVALID_NETWORK_ID) { return false; } return true; }