1.05
com.airlinemates.mlwifi.MLwifi
MLwifi
process
Wifi_ConnectionResult(success As Boolean)
scandone(wifis As List, wifiCount As Int)
isonline_pingdone(exitValue As Int)
android.permission.ACCESS_NETWORK_STATE
android.permission.ACCESS_WIFI_STATE
android.permission.CHANGE_WIFI_STATE
android.permission.ACCESS_FINE_LOCATION
android.permission.INTERNET
android.permission.CHANGE_NETWORK_STATE
android.permission.WRITE_SETTINGS
releaseWifiOn
boolean
WifiSSID
java.lang.String
isWifiConnected
boolean
is5GHzBandSupported
boolean
isOnline
boolean
CalcWifiPct
int
WifiSignal
int
WifiFrequency
int
holdWifiOn2
boolean
lockType
int
WifiMACAddress
java.lang.String
isWifiHeldOn
boolean
connectWifiAP
Connects to an existing Wifi Network
Params:
ssid - the name of the Wifi Network
security = 0 = Open (SECURITY_OPEN), 1 = WEP (SECURITY_WEP), 2 = WPA-2/PSK (SECURITY_WPA2PSK)
password - the password or "" if the network is open
timeout - fail if not connected within timeout (Ms)
Raises Wifi_ConnectionResult event on success or failure
Example:<code>
Private Sub connectToWifi
Private wifi As MLwifi
'To connect to an open network
wifi.connectWifiAP("wifissid", wifi.SECURITY_OPEN, "", 30000)
'To connect to a WPA-2 secured network
wifi.connectWifiAP("wifissid", wifi.SECURITY_WPA2PSK, "password", 30000)
End Sub
Public Sub Wifi_ConnectionResult(success As Boolean)
If success then
'Connected - set up sockets, etc...
Else
'Couldn't connect...
End If
End Sub
</code>
void
ba
anywheresoftware.b4a.BA
ssid
java.lang.String
security
int
password
java.lang.String
timeout
int
saveWifiAP
Adds a Wifi network, then optionally connects
Params:
ssid - the name of the Wifi Network
security = 0 = Open (SECURITY_OPEN), 1 = WEP (SECURITY_WEP), 2 = WPA-2/PSK (SECURITY_WPA2PSK)
password - the password or "" if the network is open
connect - ignored for Android Q+ (will always connect)
timeout - fail if not connected within timeout (ms)
Raises Wifi_ConnectionResult event on success or failure
Example:<code>
Private Sub connectToWifi
Private wifi As MLwifi
'To save & connect to an open network
wifi.saveWifiAP("wifissid", wifi.SECURITY_OPEN, "", True, 30000)
'To connect to a WPA-2 secured network
wifi.saveWifiAP("wifissid", wifi.SECURITY_WPA2PSK, "password", True, 30000)
End Sub
Public Sub Wifi_ConnectionResult(success As Boolean)
If success then
'Connected - set up sockets, etc...
Else
'Couldn't connect...
End If
End Sub
</code>
void
ba
anywheresoftware.b4a.BA
ssid
java.lang.String
security
int
password
java.lang.String
connect
boolean
timeout
int
isOnlinePing5
boolean
ba
anywheresoftware.b4a.BA
timeout
long
WifiLinkSpeed
int
isOnlinePing6
boolean
ba
anywheresoftware.b4a.BA
IpHost
java.lang.String
timeout
long
WifiIpAddress
java.lang.String
isOnlinePing3
boolean
timeout
long
WifiBand
int
isOnlinePing4
boolean
IpHost
java.lang.String
timeout
long
isSavedWifiAP
boolean
ssid
java.lang.String
ActiveNetworkType
int
isOnlinePing2
boolean
IpHost
java.lang.String
WifiBSSID
java.lang.String
isWifiEnabled
boolean
WifiSignalPct
int
APIversion
int
isOnlinePing
boolean
holdWifiOn
boolean
ActiveNetworkTypeName
java.lang.String
EnableWifi
void
Enabled
boolean
disconnectWifiAP
Disconnect from a Wifi network
Params:
none
Returns True (success) or False (failure)
Usage:<code>
Private disconnected As Boolean = MLwifi.disconnectWifiAP
</code>
boolean
reconnectWifiAP
Reconnects to a saved Wifi Network
Params:
ssid - the name of the Wifi Network
timeout - fail if not connected within timeout (Ms)
Raises Wifi_ConnectionResult event on success or failure
NOTE FOR SDK 29+: Will only work if the network being connected to is not secured.
You can connect to the previously connected network by calling disconnectWifiAP
or a specific network by calling connectWifiAP with the correct parameters.
Example:<code>
Private Sub connectToWifi
Private wifi As MLwifi
'reconnect to a Wifi network saved on this device
wifi.reconnectWifiAP("wifissid", 30000)
End Sub
Public Sub Wifi_ConnectionResult(success As Boolean)
If success then
'Connected - set up sockets, etc...
Else
'Couldn't connect...
End If
End Sub
</code>
void
ba
anywheresoftware.b4a.BA
ssid
java.lang.String
timeout
int
WifiChannel
int
WifiStrength
int
WifiSignal
int
removeWifiAP
boolean
ssid
java.lang.String
WifiAPDistance
double
isMobileConnected
boolean
debug
boolean
SECURITY_WPA2PSK
int
SECURITY_OPEN
int
SECURITY_WEP
int
com.airlinemates.mlwifi.MLwifi.MLWifiScanner
MLScan
process
listSavedNetworks
java.util.List
isSavedWifiAP
boolean
EntryNumber
int
WifiCap
java.lang.String
EntryNumber
int
connectWifiAP
void
ba
anywheresoftware.b4a.BA
EntryNumber
int
timeout
int
saveWifiAP
void
ba
anywheresoftware.b4a.BA
EntryNumber
int
securityType
java.lang.String
Password
java.lang.String
timeout
int
stopScan
void
ba
anywheresoftware.b4a.BA
startScan
void
ba
anywheresoftware.b4a.BA
EventName
java.lang.String
NoEventOnSystemScan
boolean
removeWifiAP
boolean
NetId
int
updateWifiList
void
ba
anywheresoftware.b4a.BA
getBSSID
java.lang.String
EntryNumber
int
wifis
java.lang.String[]
Results
java.util.List
4.41
V-2.17 by Jem Miller - Missing Link Software; V-3.00 by bgsoft; v4.00+ by Computersmith
MLwifi400.aar