remove Wifi network - Android android.net.wifi

Android examples for android.net.wifi:WifiManager

Description

remove Wifi network

Demo Code

import android.content.Context;
import android.net.wifi.WifiManager;

public class Main {

  public static boolean removeWifi(Context mContext, int networkId) {
    WifiManager wm = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);

    return wm.removeNetwork(networkId);

  }/*  ww w  .  java2  s. co m*/

}

Related Tutorials