Java tutorial
//package com.java2s; import java.lang.reflect.Method; import android.net.wifi.WifiManager; public class Main { private static boolean isWifiApEnabled(WifiManager wifiManager) { try { Method method = wifiManager.getClass().getMethod("isWifiApEnabled"); method.setAccessible(true); return (Boolean) method.invoke(wifiManager); } catch (NoSuchMethodException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } return false; } }