Module: wifiScanner

Module for retrieving wifiScan information from an android phone. This module throws an error if startScan is called on any other platform because iOS is not supported by the Cordova plugin used by this module. According to the wifiWizard github project at https://github.com/hoerresb/WifiWizard:

"iOS has limited functionality, as Apple's WifiManager equivalent is only available as a private API. Any app that used these features would not be allowed on the app store. The only function availabe for iOS is getCurrentSSID"

Version:
  • $$Id$$
Author:
  • Matt Weber
Source:
Version:
  • $$Id: geolocation.js 75980 2017-07-18 00:19:25Z chadlia.jerad $$
Author:
  • Matt Weber
Source:

Methods

(static) scan(listHandler)

Retrieves a list of the available networks as an array of objects and passes them to the callback function listHandler(networks). The format of the array is:

networks = [ { "level": signal_level, // raw RSSI value "SSID": ssid, // SSID as string, with escaped double quotes: "\"ssid name\"" "BSSID": bssid // MAC address of WiFi router as string "frequency": frequency of the access point channel in MHz "capabilities": capabilities // Describes the authentication, key management, and encryption schemes supported by the access point. } ]

Parameters:
Name Type Description
listHandler

The callback function that is passed the aforementioned networks array as it's first argument

Source:

(static) scan(listHandler)

Retrieves a list of the available networks as an array of objects and passes them to the callback function listHandler(networks). The format of the array is:

networks = [ { "level": signal_level, // raw RSSI value "SSID": ssid, // SSID as string, with escaped double quotes: "\"ssid name\"" "BSSID": bssid // MAC address of WiFi router as string "frequency": frequency of the access point channel in MHz "capabilities": capabilities // Describes the authentication, key management, and encryption schemes supported by the access point. } ]

Parameters:
Name Type Description
listHandler

The callback function that is passed the aforementioned networks array as it's first argument

Source:

(inner) checkAndGetLocationPermissions(onSuccess, onFailure)

This function will first check that the necessary location permissions have been acquired. If permissions are successfully acquired or have already been acquired, this function will call the onSuccess callback (with no arguments). If permssions are not successfully acquired this function will call the onFailure callback (with no arguments). If either of the android permission requests produce an error (which is not the same as the user rejecting permssions) this function throws an error.

Parameters:
Name Type Description
onSuccess

The callback function to be executed upon successful acquisition of location permissions

onFailure

The callback function to be executed if location permissions are not already given and the user rejects the location permission request

Source:

(inner) checkAndGetLocationPermissions(onSuccess, onFailure)

This function will first check that the necessary location permissions have been acquired. If permissions are successfully acquired or have already been acquired, this function will call the onSuccess callback (with no arguments). If permssions are not successfully acquired this function will call the onFailure callback (with no arguments). If either of the android permission requests produce an error (which is not the same as the user rejecting permssions) this function throws an error.

Parameters:
Name Type Description
onSuccess

The callback function to be executed upon successful acquisition of location permissions

onFailure

The callback function to be executed if location permissions are not already given and the user rejects the location permission request

Source:

Module for retrieving wifiScan information from an android phone. This module throws an error if startScan is called on any other platform because iOS is not supported by the Cordova plugin used by this module. According to the wifiWizard github project at https://github.com/hoerresb/WifiWizard:

"iOS has limited functionality, as Apple's WifiManager equivalent is only available as a private API. Any app that used these features would not be allowed on the app store. The only function availabe for iOS is getCurrentSSID"

Version:
  • $$Id$$
Author:
  • Matt Weber
Source:
Version:
  • $$Id: geolocation.js 75980 2017-07-18 00:19:25Z chadlia.jerad $$
Author:
  • Matt Weber
Source:

Methods

(static) scan(listHandler)

Retrieves a list of the available networks as an array of objects and passes them to the callback function listHandler(networks). The format of the array is:

networks = [ { "level": signal_level, // raw RSSI value "SSID": ssid, // SSID as string, with escaped double quotes: "\"ssid name\"" "BSSID": bssid // MAC address of WiFi router as string "frequency": frequency of the access point channel in MHz "capabilities": capabilities // Describes the authentication, key management, and encryption schemes supported by the access point. } ]

Parameters:
Name Type Description
listHandler

The callback function that is passed the aforementioned networks array as it's first argument

Source:

(static) scan(listHandler)

Retrieves a list of the available networks as an array of objects and passes them to the callback function listHandler(networks). The format of the array is:

networks = [ { "level": signal_level, // raw RSSI value "SSID": ssid, // SSID as string, with escaped double quotes: "\"ssid name\"" "BSSID": bssid // MAC address of WiFi router as string "frequency": frequency of the access point channel in MHz "capabilities": capabilities // Describes the authentication, key management, and encryption schemes supported by the access point. } ]

Parameters:
Name Type Description
listHandler

The callback function that is passed the aforementioned networks array as it's first argument

Source:

(inner) checkAndGetLocationPermissions(onSuccess, onFailure)

This function will first check that the necessary location permissions have been acquired. If permissions are successfully acquired or have already been acquired, this function will call the onSuccess callback (with no arguments). If permssions are not successfully acquired this function will call the onFailure callback (with no arguments). If either of the android permission requests produce an error (which is not the same as the user rejecting permssions) this function throws an error.

Parameters:
Name Type Description
onSuccess

The callback function to be executed upon successful acquisition of location permissions

onFailure

The callback function to be executed if location permissions are not already given and the user rejects the location permission request

Source:

(inner) checkAndGetLocationPermissions(onSuccess, onFailure)

This function will first check that the necessary location permissions have been acquired. If permissions are successfully acquired or have already been acquired, this function will call the onSuccess callback (with no arguments). If permssions are not successfully acquired this function will call the onFailure callback (with no arguments). If either of the android permission requests produce an error (which is not the same as the user rejecting permssions) this function throws an error.

Parameters:
Name Type Description
onSuccess

The callback function to be executed upon successful acquisition of location permissions

onFailure

The callback function to be executed if location permissions are not already given and the user rejects the location permission request

Source: