Code example for Method

Methods: invoke

0
		try { 
			final Method WifiManager_isWifiApEnabled = wifiManager.getClass().getMethod("isWifiApEnabled");
			if (WifiManager_isWifiApEnabled == null) {
				throw new WifiUtilsException(new MethodNotFoundException(WifiManager.class.getSimpleName() + ".isWifiApEnabled()"));
			} else { 
				final boolean result = (Boolean) WifiManager_isWifiApEnabled.invoke(wifiManager);
				return result;
			} 
		} catch (final Throwable t) {
			throw new WifiUtilsException(t);
		} 
	} 
 
	public static boolean isWifiHotspotEnabled(final Context pContext, final boolean pDefault) {
		try { 
			return WifiUtils.isWifiHotspotEnabled(pContext);
		} catch (final WifiUtilsException e) {
			return pDefault;
		} 
	}