is Wifi Ap Enable - Android Phone

Android examples for Phone:wifi

Description

is Wifi Ap Enable

Demo Code


//package com.java2s;
import java.lang.reflect.Method;

import android.net.wifi.WifiManager;

public class Main {
    public static Boolean isWifiApEnable(WifiManager wifiManager) {
        Method method;//from   w  w w . j  av a  2  s .  c  o m
        try {
            method = wifiManager.getClass().getMethod("isWifiApEnabled");
            Boolean enable = (Boolean) method.invoke(wifiManager);
            return enable;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
}

Related Tutorials