android.net.wifi
Class WifiNative
java.lang.Object
android.net.wifi.WifiNative
public class WifiNative
- extends Object
Native calls for sending requests to the supplicant daemon, and for
receiving asynchronous events. All methods of the form "xxxxCommand()"
must be single-threaded, to avoid requests and responses initiated
from multiple threads from being intermingled.
Note that methods whose names are not of the form "xxxCommand()" do
not talk to the supplicant daemon.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BLUETOOTH_COEXISTENCE_MODE_ENABLED
static final int BLUETOOTH_COEXISTENCE_MODE_ENABLED
- See Also:
- Constant Field Values
BLUETOOTH_COEXISTENCE_MODE_DISABLED
static final int BLUETOOTH_COEXISTENCE_MODE_DISABLED
- See Also:
- Constant Field Values
BLUETOOTH_COEXISTENCE_MODE_SENSE
static final int BLUETOOTH_COEXISTENCE_MODE_SENSE
- See Also:
- Constant Field Values
WifiNative
public WifiNative()
getErrorString
public static String getErrorString(int errorCode)
loadDriver
public static boolean loadDriver()
unloadDriver
public static boolean unloadDriver()
startSupplicant
public static boolean startSupplicant()
stopSupplicant
public static boolean stopSupplicant()
connectToSupplicant
public static boolean connectToSupplicant()
closeSupplicantConnection
public static void closeSupplicantConnection()
pingCommand
public static boolean pingCommand()
scanCommand
public static boolean scanCommand()
setScanModeCommand
public static boolean setScanModeCommand(boolean setActive)
listNetworksCommand
public static String listNetworksCommand()
addNetworkCommand
public static int addNetworkCommand()
setNetworkVariableCommand
public static boolean setNetworkVariableCommand(int netId,
String name,
String value)
getNetworkVariableCommand
public static String getNetworkVariableCommand(int netId,
String name)
removeNetworkCommand
public static boolean removeNetworkCommand(int netId)
enableNetworkCommand
public static boolean enableNetworkCommand(int netId,
boolean disableOthers)
disableNetworkCommand
public static boolean disableNetworkCommand(int netId)
reconnectCommand
public static boolean reconnectCommand()
reassociateCommand
public static boolean reassociateCommand()
disconnectCommand
public static boolean disconnectCommand()
statusCommand
public static String statusCommand()
getRssiCommand
public static int getRssiCommand()
getLinkSpeedCommand
public static int getLinkSpeedCommand()
getMacAddressCommand
public static String getMacAddressCommand()
scanResultsCommand
public static String scanResultsCommand()
startDriverCommand
public static boolean startDriverCommand()
stopDriverCommand
public static boolean stopDriverCommand()
setPowerModeCommand
public static boolean setPowerModeCommand(int mode)
setBluetoothCoexistenceModeCommand
public static boolean setBluetoothCoexistenceModeCommand(int mode)
- Sets the bluetooth coexistence mode.
- Parameters:
mode - One of BLUETOOTH_COEXISTENCE_MODE_DISABLED,
BLUETOOTH_COEXISTENCE_MODE_ENABLED, or
BLUETOOTH_COEXISTENCE_MODE_SENSE.
- Returns:
- Whether the mode was successfully set.
saveConfigCommand
public static boolean saveConfigCommand()
reloadConfigCommand
public static boolean reloadConfigCommand()
setScanResultHandlingCommand
public static boolean setScanResultHandlingCommand(int mode)
addToBlacklistCommand
public static boolean addToBlacklistCommand(String bssid)
clearBlacklistCommand
public static boolean clearBlacklistCommand()
doDhcpRequest
public static boolean doDhcpRequest(DhcpInfo results)
getDhcpError
public static String getDhcpError()
waitForEvent
public static String waitForEvent()
- Wait for the supplicant to send an event, returning the event string.
- Returns:
- the event string sent by the supplicant.
Please submit a feedback, bug or feature