Hi Code Masters,
I see there is a built in Wifi library in B4A (WifiConnect).
Could someone please give me a simple code snippet of how to use this?
I have added this to the Manifest (Not sure if I need them all):
AddPermission(android.permission.ACCESS_NETWORK_STATE)
AddPermission(android.permission.ACCESS_WIFI_STATE)
AddPermission(android.permission.CHANGE_WIFI_STATE)
AddPermission(android.permission.INTERNET)
AddPermission(android.permission.WAKE_LOCK)
And my code so far is:
Dim wifi As WiFiConnect
wifi.connectToSSID(wifi.WIFI_WPA,"MySSID","MyPassword") '<--- I replace SSID and Password with my real credentials
This does not give any errors, but how do I know I am connected, ie. what are the events I must respond to? How do I send/receive data?
Thank you for your time,
Regards,
Jacques.