Is Wifi service enabled by Context.WIFI_SERVICE : WiFi « Network « Android






Is Wifi service enabled by Context.WIFI_SERVICE

 

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


 class WifiUtil {


    public static final boolean isEnabled(Context context) {
        return ((WifiManager)context.getSystemService(Context.WIFI_SERVICE)).isWifiEnabled();
    }


}

   
  








Related examples in the same category

1.Airplane Mode and turn Wifi On
2.Get System Wifi Ip Address
3.Allow WiFi or allow mobile
4.Is WiFi Connected