Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
community-cordova-plugin-wifi
Advanced tools
Readme
The Community Cordova Plugin WiFi offers extensive WiFi management functionalities for Cordova applications on Android and iOS platforms. While Android devices benefit from a wide range of WiFi management capabilities, iOS support focuses on network information retrieval due to platform restrictions.
I dedicate a considerable amount of my free time to developing and maintaining many cordova plugins for the community (See the list with all my maintained plugins). To help ensure this plugin is kept updated, new features are added and bugfixes are implemented quickly, please donate a couple of dollars (or a little more if you can stretch) as this will help me to afford to dedicate time to its maintenance. Please consider donating if you're using this plugin in an app that makes you money, or if you're asking for new features or priority bug fixes. Thank you!
cordova plugin add community-cordova-plugin-wifi
Platform Support: Android, iOS
Checks if there is an active internet connection.
WifiPlugin.isConnectedToInternet().then(isConnected => {
console.log("Internet connectivity status:", isConnected);
}).catch(error => {
console.error("Error:", error);
});
Response:
isConnected
(boolean): True if the device is connected to the internet.Scans for available WiFi networks.
Platform Support: Android
WifiPlugin.getWifiList().then(wifiList => {
console.log("WiFi networks:", wifiList);
}).catch(error => {
console.error("Error:", error);
});
Response Fields:
Each object in the wifiList
array contains:
SSID
(string): Network name.BSSID
(string): Access point MAC address.capabilities
(string): Supported protocols and authentication methods.frequency
(number): Channel frequency in MHz.level
(number): Signal strength in dBm.security
(string): Security protocols in use.Retrieves comprehensive WiFi network details.
Platform Support: Android, iOS (Limited details on iOS)
WifiPlugin.getAllWifiDetails().then(details => {
console.log("WiFi Details:", details);
}).catch(error => {
console.error("Error:", error);
});
Response Fields:
ssid
(string): Current network SSID.bssid
(string): Network BSSID.ip
(string): Device IP address in the network.mac
(string, Android only): Device MAC address.signalStrength
(number, Android only): WiFi signal strength.networkid
, linkspeed
, rssi
, etc., with availability varying between platforms.Checks if WiFi is enabled on the device.
Platform Support: Android
WifiPlugin.isWifiEnabled().then(isEnabled => {
console.log("WiFi Enabled:", isEnabled);
}).catch(error => {
console.error("Error:", error);
});
Response:
isEnabled
(boolean): True if WiFi is enabled.Connects to a specified WiFi network.
Platform Support: Android
WifiPlugin.connectToNetwork("SSID", "password").then(() => {
console.log("Connected successfully.");
}).catch(error => {
console.error("Error:", error);
});
No additional response fields.
This plugin supports Android and iOS. Note that iOS functionalities are limited to retrieving network information due to platform restrictions.
Ensure your application requests the necessary permissions. Android requires permissions for accessing WiFi state, location, and changing WiFi connectivity. iOS may require location permissions for accessing network information.
Contributions are welcome! Feel free to submit pull requests or open issues on the GitHub repository.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A plugin for full detail for wifi
The npm package community-cordova-plugin-wifi receives a total of 1 weekly downloads. As such, community-cordova-plugin-wifi popularity was classified as not popular.
We found that community-cordova-plugin-wifi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.