Open the wifi setting activity
EASYUICONTEXT->openActivity("WifiSettingActivity");
wifi operation function description
Get WifiManager object
#include "net/NetManager.h"
WifiManager *pWM = NETMANAGER->getWifiManager();
// You can define a macro to facilitate the following function calls
#define WIFIMANAGER NETMANAGER->getWifiManager()
Check whether the machine supports wifi
WIFIMANAGER->isSupported();
Check if wifi is on
WIFIMANAGER->isWifiEnable();
Turn on wifi
WIFIMANAGER->enableWifi(true);
Scan wifi
WIFIMANAGER->startScan();
Connect to wifi
WIFIMANAGER->connect(ssid, pw);
Disconnect wifi connection
WIFIMANAGER->disconnect();
Check if wifi is connected
WIFIMANAGER->isConnected();
Get connected wifi information
WIFIMANAGER->getConnectionInfo();
Registration and un-registration wifi information monitoring
void addWifiListener(IWifiListener *pListener);
void removeWifiListener(IWifiListener *pListener);
Sample code
See the NetDemo
project in Sample Code