get Wifi Configurations - Android Phone

Android examples for Phone:wifi

Description

get Wifi Configurations

Demo Code


//package com.java2s;

import java.util.List;
import android.content.Context;

import android.net.wifi.WifiConfiguration;

import android.net.wifi.WifiManager;

public class Main {
    public static List<WifiConfiguration> getConfigurations(Context mContext) {

        WifiManager wm = (WifiManager) mContext
                .getSystemService(Context.WIFI_SERVICE);

        List<WifiConfiguration> mList = wm.getConfiguredNetworks();

        return mList;
    }/*from w  w w.  ja  va2s .co m*/
}

Related Tutorials