trigger Wifi Scan - Android android.net.wifi

Android examples for android.net.wifi:Wifi Scan

Description

trigger Wifi Scan

Demo Code

import android.content.Context;
import android.net.wifi.ScanResult;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiManager;
import android.util.Log;

public class Main{

    public static void triggerWifiScan(Context context) {
        WifiManager wifi = (WifiManager) context
                .getSystemService(Context.WIFI_SERVICE);
        wifi.startScan();/* www  . j  a va2s . c  o m*/
    }

}

Related Tutorials