usn1485 / phonegap-wifi-info

phonegap wifi info plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cordova WifiInfo Plugin

  • License - The MIT License
  • Test on Cordova 3.4.0

##Install Step (Cordova CLI)

API

Get WifiInfo

Retrieve the wifi information available from the last scan.
(TODO: handle options to require a new scan and fresh data)

navigator.wifi.getWifiInfo(success, error, options);

Watch WifiInfo

Require a new wifi scan as soon as possible and retrieve continuatively the obtained data.
(TODO: handle options to enable/disable the scan request)

id = navigator.wifi.watchWifiInfo(success, error, options);

Clear Watch

Unwatch wifi updates

navigator.wifi.clearWatch(id);

On Success Data

{
	connection: {
		BSSID: BSSID,
		HiddenSSID: HiddenSSID,
		SSID: SSID,
		MacAddress: MacAddress,
		IpAddressInt: IpAddressInt,
		IpAddress: IpAddress,
		NetworkId: NetworkId,
		RSSI: RSSI,
		LinkSpeed: LinkSpeed
	},
	
	networks: [
		{
			BSSID: BSSID,
			SSID: SSID,
			frequency: frequency,
			level: level,
			capabilities: capabilities
		},
		...
	]
}

About

phonegap wifi info plugin


Languages

Language:Java 52.5%Language:Objective-C 29.8%Language:JavaScript 17.7%