WifiWizard2
WifiWizard2 enables Wifi management for both Android and iOS applications within Cordova/Phonegap projects.
This project is a fork of the WifiWizard plugin with fixes and updates, as well as patches taken from the Cordova Network Manager plugin.
github.com/tripflex/WifiWizard2
Stuck on a Cordova issue?
If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.
Installation
- Capacitor
- Cordova
- Enterprise
$ npm install cordova-plugin-wifiwizard2
$ npm install @awesome-cordova-plugins/wifi-wizard-2
$ ionic
cap sync
$ ionic cordova plugin add cordova-plugin-wifiwizard2
$ npm install @awesome-cordova-plugins/wifi-wizard-2
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us
Supported Platforms
- Android
- iOS
Usage
React
Learn more about using Ionic Native components in React
Angular
import { WifiWizard2 } from '@awesome-cordova-plugins/wifi-wizard-2/ngx';
constructor(private wifiWizard2: WifiWizard2) { }
# Global Functions
These are functions that can be used by both Android and iOS applications
```tsx
this.wifiWizard2.getConnectedSSID()
- Returns connected network SSID (only if connected) in success callback, otherwise fail callback will be called (if not connected or unable to retrieve)
- This does NOT return the BSSID if unable to obtain SSID (like original WifiWizard did)
this.wifiWizard2.getConnectedBSSID();
- Same as above, except BSSID (mac) is returned
this.wifiWizard2.timeout(delay);
delay
should be time in milliseconds to delay- Helper async timeout delay,
delay
is optional, default is 2000ms = 2 seconds - This method always returns a resolved promise after the delay, it will never reject or throw an error
Example inside async function
async function example() {
await this.wifiWizard2.timeout(4000);
// do something after 4 seconds
}
Example inside standard non-async function
function example(){
this.wifiWizard2.timeout(4000).then( function(){
// do something after waiting 4 seconds
}):
}