2012-09-13 17 views

Respuesta

10

Código:

Method method = wifiManager.getClass().getDeclaredMethod("getWifiApState"); 
method.setAccessible(true); 
int actualState = (Integer) method.invoke(wifiManager, (Object[]) null); 

el estado real debe ser:

public static int AP_STATE_DISABLING = 10; 
public static int AP_STATE_DISABLED = 11; 
public static int AP_STATE_ENABLING = 12; 
public static int AP_STATE_ENABLED = 13; 
public static int AP_STATE_FAILED = 14; 

WifiManger source code

esperanza que esto podría ser ayuda usted!

Cuestiones relacionadas