public static boolean isTether(Context context){boolean isWifiAPenalbed = false; WifiManager wm = (WifiManager)context.getSystemService(Context.WIFI_SERVICE);Method[] wmMethods = wm.getClass().getDeclaredMethods(); for(Method method : wmMethods){if(method.getName().equals("isWifiApEnabled")){try{isWifiAPenabled = (Boolean)method.invoke(wm);}catch(Exception e){ ; }}}return isWifiAPenabled;}