FileDocCategorySizeDatePackage
WifiNative.javaAPI DocAndroid 1.5 API5129Wed May 06 22:42:04 BST 2009android.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. {@hide}

Fields Summary
static final int
BLUETOOTH_COEXISTENCE_MODE_ENABLED
static final int
BLUETOOTH_COEXISTENCE_MODE_DISABLED
static final int
BLUETOOTH_COEXISTENCE_MODE_SENSE
Constructors Summary
Methods Summary
public static native intaddNetworkCommand()

public static native booleanaddToBlacklistCommand(java.lang.String bssid)

public static native booleanclearBlacklistCommand()

public static native voidcloseSupplicantConnection()

public static native booleanconnectToSupplicant()

public static native booleandisableNetworkCommand(int netId)

public static native booleandisconnectCommand()

public static native booleandoDhcpRequest(android.net.DhcpInfo results)

public static native booleanenableNetworkCommand(int netId, boolean disableOthers)

public static native java.lang.StringgetDhcpError()

public static native java.lang.StringgetErrorString(int errorCode)

public static native intgetLinkSpeedCommand()

public static native java.lang.StringgetMacAddressCommand()

public static native java.lang.StringgetNetworkVariableCommand(int netId, java.lang.String name)

public static native intgetNumAllowedChannelsCommand()

public static native intgetRssiCommand()

public static native java.lang.StringlistNetworksCommand()

public static native booleanloadDriver()

public static native booleanpingCommand()

public static native booleanreassociateCommand()

public static native booleanreconnectCommand()

public static native booleanreloadConfigCommand()

public static native booleanremoveNetworkCommand(int netId)

public static native booleansaveConfigCommand()

public static native booleanscanCommand()

public static native java.lang.StringscanResultsCommand()

public static native booleansetBluetoothCoexistenceModeCommand(int mode)
Sets the bluetooth coexistence mode.

param
mode One of {@link #BLUETOOTH_COEXISTENCE_MODE_DISABLED}, {@link #BLUETOOTH_COEXISTENCE_MODE_ENABLED}, or {@link #BLUETOOTH_COEXISTENCE_MODE_SENSE}.
return
Whether the mode was successfully set.

public static native booleansetBluetoothCoexistenceScanModeCommand(boolean setCoexScanMode)
Enable or disable Bluetooth coexistence scan mode. When this mode is on, some of the low-level scan parameters used by the driver are changed to reduce interference with A2DP streaming.

param
isSet whether to enable or disable this mode
return
{@code true} if the command succeeded, {@code false} otherwise.

public static native booleansetNetworkVariableCommand(int netId, java.lang.String name, java.lang.String value)

public static native booleansetNumAllowedChannelsCommand(int numChannels)

public static native booleansetPowerModeCommand(int mode)

public static native booleansetScanModeCommand(boolean setActive)

public static native booleansetScanResultHandlingCommand(int mode)

public static native booleanstartDriverCommand()

public static native booleanstartPacketFiltering()
Start filtering out multicast packets, to reduce battery consumption that would result from processing them, only to discard them.

return
{@code true} if the operation succeeded, {@code false} otherwise

public static native booleanstartSupplicant()

public static native java.lang.StringstatusCommand()

public static native booleanstopDriverCommand()

public static native booleanstopPacketFiltering()
Stop filtering out multicast packets.

return
{@code true} if the operation succeeded, {@code false} otherwise

public static native booleanstopSupplicant()

public static native booleanunloadDriver()

public static native java.lang.StringwaitForEvent()
Wait for the supplicant to send an event, returning the event string.

return
the event string sent by the supplicant.