is Wifi Open - Android android.net.wifi

Android examples for android.net.wifi:Wifi State

Description

is Wifi Open

Demo Code

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

public class Main {

  public static boolean isWifiOpen(Context mContext) {

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

    return wm.isWifiEnabled();

  }/* w ww . j a  va2  s.c om*/

}

Related Tutorials