Android examples for android.net.wifi:Wifi Property
get Device List from WifiManager
import java.util.ArrayList; import java.util.List; import android.net.wifi.ScanResult; import android.net.wifi.WifiManager; public class Main { public static List<ScanResult> getDeviceList(WifiManager mWifiManager) { if (!mWifiManager.isWifiEnabled()) { mWifiManager.setWifiEnabled(true); }/*from ww w. j a v a 2 s .c om*/ List<ScanResult> tempList = new ArrayList<ScanResult>(); mWifiManager.startScan(); tempList = mWifiManager.getScanResults(); return tempList; } }