Skip to content

Latest commit

 

History

History
799 lines (573 loc) · 32.6 KB

PLUGIN_USAGE.MD

File metadata and controls

799 lines (573 loc) · 32.6 KB

Objects

cordova.plugins.hotspot : object

Typedefs

errorCallback : function

Callback which provides the error details.

isAvailableCallback : function

Callback which provides the toggle Wifi info

getWriteSettingsCallback : function
toggleWifiCallback : function

Callback which provides the toggle Wifi info

createHotspotCallback : function

A callback function to be called when start was successful

startHotspotCallback : function

A callback function to be called when start was successful

stopHotspotCallback : function

A callback function to be called when stop was successful

isHotspotEnabledCallback : function

A callback function to be called when stop was successful

getAllHotspotDevicesCallback : function

A callback function to be called when connected successful and is called with an array of JSON objects.

connectToWifiCallback : function

A callback function to be called when connected successful

connectToWifiAuthEncryptCallback : function

A callback function to be called when connected successful

configureHotspotCallback : function

A callback function to be called when connected successful

addWifiNetworkCallback : function

A callback function to be called when connected successful

removeWifiNetworkCallback : function

A callback function function to be called when removal was successful

isConnectedToInternetCallback : function

A callback function to be called with the result

isConnectedToInternetViaWifiCallback : function

A callback function to be called when connection is done via wifi

isWifiOnCallback : function

A callback function to be called when WiFi is enabled

isWifiSupportedCallback : function

A callback function to be called when WiFi is supported

isWifiDirectSupportedCallback : function

A callback function to be called when WiFi is supported

scanWifiCallback : function

A callback function to be called when scan is started

scanWifiCallback : function

A callback function to be called when scan is started

startWifiPeriodicallyScanCallback : function

A callback function to be called when scan is started

stopWifiPeriodicallyScanCallback : function

A callback function to be called when scan is stopped

getNetConfigCallback : function

A callback function to be called when scan is started

getConnectionInfoCallback : function

Callback which provides the connection information.

pingHostCallback : function

Callback which provides the ping information.

getMacAddressOfHostCallback : function

A callback function to be called with all information

isDnsLiveCallback : function

A callback function to be called with DNS details

isPortLiveCallback : function

A callback function to be called with DNS details

isRootedCallback : function

A callback function to be called with Rooted information

cordova.plugins.hotspot : object

Kind: global namespace

cordova.plugins.hotspot.isAvailable(callback)

Check if plugin is available

Kind: instance method of cordova.plugins.hotspot

Param Type Description
callback isAvailableCallback A callback function which is invoked on success.

cordova.plugins.hotspot.getWriteSettings(successCB, errorCB)

get the current write settings of the app

Kind: instance method of cordova.plugins.hotspot

Param Type
successCB getWriteSettingsCallback
errorCB errorCallback

cordova.plugins.hotspot.requestWriteSettings(callback, error)

get the current write settings of the app

Kind: instance method of cordova.plugins.hotspot

Param Type Description
callback requestWriteSettingsCallback A callback function which is invoked on success. *
error errorCB callback A callback function to be called when errors occurr

cordova.plugins.hotspot.toggleWifi(callback, errorCB)

Method to Toggle wifi ON/OFF

Kind: instance method of cordova.plugins.hotspot

Param Type Description
callback toggleWifiCallback A callback function which is invoked on success.
errorCB errorCallback A callback function to be called when errors occurr

cordova.plugins.hotspot.createHotspot(ssid, mode, password, successCB, errorCB)

Create a WiFi Hotspot

Kind: instance method of cordova.plugins.hotspot

Param Type Description
ssid string SSID to connect
mode string wireless mode (Open, WEP, WPA, WPA_PSK)
password string password to use
successCB createHotspotCallback A callback function to be called when start was successful
errorCB errorCallback A callback function to be called when connection was not successful

cordova.plugins.hotspot.startHotspot(successCB, errorCB)

Start a default WiFi Hotspot

Kind: instance method of cordova.plugins.hotspot

Param Type Description
successCB startHotspotCallback A callback function to be called when start was successful
errorCB errorCallback A callback function to be called when start was not successful

cordova.plugins.hotspot.stopHotspot(successCB, errorCB)

Stop a running default WiFi Hotspot

Kind: instance method of cordova.plugins.hotspot

Param Type Description
successCB stopHotspotCallback A callback function to be called when stop was successful
errorCB errorCallback A callback function to be called when stop was not successful

cordova.plugins.hotspot.isHotspotEnabled(successCB, errorCB)

Checks if hot spot is enabled

Kind: instance method of cordova.plugins.hotspot

Param Type Description
successCB isHotspotEnabledCallback A callback function with the result
errorCB errorCallback A error callback function

cordova.plugins.hotspot.getAllHotspotDevices(A, errorCB)

Get all connected devices

Kind: instance method of cordova.plugins.hotspot

Param Type Description
A getAllHotspotDevicesCallback callback function when hotspot connection is active and info was rad.
errorCB errorCallback An error callback

cordova.plugins.hotspot.connectToWifi(ssid, password, successCB, errorCB)

Connect to a WiFi network

Kind: instance method of cordova.plugins.hotspot

Param Type Description
ssid string SSID to connect
password string password to use
successCB connectToWifiCallback A callback function to be called when connected successful
errorCB errorCallback A callback function to be called when connection was not successful

cordova.plugins.hotspot.connectToWifiAuthEncrypt(ssid, password, authentication, encryption, successCB, errorCB)

configure current WiFi Hotspot

Kind: instance method of cordova.plugins.hotspot

Param Type Description
ssid string SSID to connect
password string password to use
authentication string mode use (LEAP, SHARED, OPEN)
encryption Array.<string> mode use (CCMP, TKIP, WEP104, WEP40)
successCB connectToWifiAuthEncryptCallback A callback function to be called when connected successful
errorCB errorCallback A callback function to be called when connection was not successful

cordova.plugins.hotspot.configureHotspot(ssid, mode, password, successCB, errorCB)

configure current WiFi Hotspot

Kind: instance method of cordova.plugins.hotspot

Param Type Description
ssid string SSID to connect
mode string mode use (Open, WEP, WPA, WPA_PSK)
password string password to use
successCB configureHotspotCallback A callback function to be called when connected successful
errorCB errorCallback A callback function to be called when configuration was not successful

cordova.plugins.hotspot.addWifiNetwork(ssid, mode, password, successCB, errorCB)

add a WiFi network

Kind: instance method of cordova.plugins.hotspot

Param Type Description
ssid string SSID to connect
mode string mode use (Open, WEP, WPA, WPA_PSK)
password string password to use
successCB function A callback function to be called when adding successful
errorCB errorCallback A callback function to be called when adding was not successful

cordova.plugins.hotspot.removeWifiNetwork(ssid, successCB, errorCB)

Delete a WiFi network

Kind: instance method of cordova.plugins.hotspot

Param Type Description
ssid string SSID to connect
successCB function A callback function function to be called when removal was successful
errorCB errorCallback A callback function to be called when removal was not successful

cordova.plugins.hotspot.isConnectedToInternet(successCB, errorCB)

Check if connection to internet is active

Kind: instance method of cordova.plugins.hotspot

Param Type Description
successCB isConnectedToInternetCallback A callback function to be called with the result
errorCB errorCallback An error callback

cordova.plugins.hotspot.isConnectedToInternetViaWifi(successCB, errorCB)

Check if connection to internet is active via WiFi

Kind: instance method of cordova.plugins.hotspot

Param Type Description
successCB isConnectedToInternetViaWifiCallback A callback function to be called with the result
errorCB errorCallback An error callback

cordova.plugins.hotspot.isWifiOn(successCB, errorCB)

Check if WiFi is enabled

Kind: instance method of cordova.plugins.hotspot

Param Type Description
successCB isWifiOnCallback A callback function with the result
errorCB errorCallback An error callback

cordova.plugins.hotspot.isWifiSupported(successCB, errorCB)

Check if WiFi is supported

Kind: instance method of cordova.plugins.hotspot

Param Type Description
successCB isWifiSupportedCallback A callback function with the result
errorCB errorCallback An error callback

cordova.plugins.hotspot.isWifiDirectSupported(successCB, errorCB)

Check if WiFi Direct is supported

Kind: instance method of cordova.plugins.hotspot

Param Type Description
successCB isWifiDirectSupportedCallback A callback function with the result
errorCB errorCallback An error callback

cordova.plugins.hotspot.scanWifi(successCB, errorCB)

Scan wifi

Kind: instance method of cordova.plugins.hotspot

Param Type Description
successCB scanWifiCallback A callback function to be called when scan is started
errorCB errorCallback An error callback

cordova.plugins.hotspot.scanWifiByLevel(successCB, errorCB)

Scan wifi by level

Kind: instance method of cordova.plugins.hotspot

Param Type Description
successCB scanWifiByLevelCallback A callback function to be called when scan is started
errorCB errorCallback An error callback

cordova.plugins.hotspot.startWifiPeriodicallyScan(interval, duration, successCB, errorCB)

Start a periodically scan wifi

Kind: instance method of cordova.plugins.hotspot

Param Type Description
interval long interval to use
duration long duration to use
successCB startWifiPeriodicallyScanCallback A callback function to be called when scan is started
errorCB errorCallback An error callback

cordova.plugins.hotspot.stopWifiPeriodicallyScan(successCB, errorCB)

Stop a periodically scan wifi

Kind: instance method of cordova.plugins.hotspot

Param Type Description
successCB stopWifiPeriodicallyScanCallback A callback function to be called when scan is stopped
errorCB errorCallback An error callback

cordova.plugins.hotspot.getNetConfig(successCB, errorCB)

Get network information, e.g Gateway Ip/Mac Device Mac/Ip etc

Kind: instance method of cordova.plugins.hotspot

Param Type Description
successCB getNetConfigCallback A callback function to be called with all information
errorCB errorCallback An error callback

cordova.plugins.hotspot.getConnectionInfo(successCB, errorCB)

Get current connection information, e.g SSID, linkSpeed,IPAddress etc

Kind: instance method of cordova.plugins.hotspot

Param Type Description
successCB getConnectionInfoCallback A callback function with the connection details.
errorCB errorCallback An error callback

cordova.plugins.hotspot.pingHost(ip, successCB, errorCB)

Ping a host

Kind: instance method of cordova.plugins.hotspot

Param Type Description
ip string host IP
successCB pingHostCallback A callback function to be called with all information
errorCB errorCallback An error callback

cordova.plugins.hotspot.getMacAddressOfHost(ip, successCB, errorCB)

Get MAC address of host

Kind: instance method of cordova.plugins.hotspot

Param Type Description
ip string host IP
successCB getMacAddressOfHost A callback function to be called with all information
errorCB errorCallback An error callback

cordova.plugins.hotspot.isDnsLive(ip, successCB, errorCB)

dnsLive

Kind: instance method of cordova.plugins.hotspot

Param Type Description
ip string host IP
successCB function A callback function to be called with the result
errorCB errorCallback An error callback

cordova.plugins.hotspot.isPortLive(ip, successCB, errorCB)

is port available

Kind: instance method of cordova.plugins.hotspot

Param Type Description
ip string host IP
successCB isPortLiveCallback A callback function to be called with all information
errorCB errorCallback An error callback

cordova.plugins.hotspot.isRooted(successCB, errorCB)

Check Device is Rooted

Kind: instance method of cordova.plugins.hotspot

Param Type Description
successCB isRootedCallback A callback function to be called with all information
errorCB errorCallback An error callback

errorCallback : function

Callback which provides the error details.

Kind: global typedef

Param Type Description
err Object error details.

isAvailableCallback : function

Callback which provides the toggle Wifi info

Kind: global typedef

Param Type Description
available, boolean true or false as response

getWriteSettingsCallback : function

Kind: global typedef

Param Type Description
settings boolean false if no write settings, true if write settings are permitted

toggleWifiCallback : function

Callback which provides the toggle Wifi info

Kind: global typedef

Param Type Description
wifiOn, boolean true or false as response,true if wifi ON and false if wifi OFF

createHotspotCallback : function

A callback function to be called when start was successful

Kind: global typedef

startHotspotCallback : function

A callback function to be called when start was successful

Kind: global typedef

stopHotspotCallback : function

A callback function to be called when stop was successful

Kind: global typedef

isHotspotEnabledCallback : function

A callback function to be called when stop was successful

Kind: global typedef

Param Type Description
enabled, boolean true if hotspot is off or false as response

getAllHotspotDevicesCallback : function

A callback function to be called when connected successful and is called with an array of JSON objects.

Kind: global typedef

Param Type Description
of Array objects: [{ ip, mac }]

connectToWifiCallback : function

A callback function to be called when connected successful

Kind: global typedef

connectToWifiAuthEncryptCallback : function

A callback function to be called when connected successful

Kind: global typedef

configureHotspotCallback : function

A callback function to be called when connected successful

Kind: global typedef

addWifiNetworkCallback : function

A callback function to be called when connected successful

Kind: global typedef

removeWifiNetworkCallback : function

A callback function function to be called when removal was successful

Kind: global typedef

isConnectedToInternetCallback : function

A callback function to be called with the result

Kind: global typedef

Param Type Description
connected, boolean true if device is connected to internet, otherwise false

isConnectedToInternetViaWifiCallback : function

A callback function to be called when connection is done via wifi

Kind: global typedef

Param Type Description
connected, boolean true if device is connected to internet via WiFi, otherwise false

isWifiOnCallback : function

A callback function to be called when WiFi is enabled

Kind: global typedef

Param Type Description
connected, boolean true if device if WiFi is on, otherwise false

isWifiSupportedCallback : function

A callback function to be called when WiFi is supported

Kind: global typedef

Param Type Description
wifiSupported, boolean true if WiFi is supported, otherwise false

isWifiDirectSupportedCallback : function

A callback function to be called when WiFi is supported

Kind: global typedef

Param Type Description
wifiSupported, boolean true if WiFi Direct is supported, otherwise false

scanWifiCallback : function

A callback function to be called when scan is started

Kind: global typedef

Param Type Description
info Array An array of JSON objects with the following information: [{ SSID, BSSID, frequency, level, timestamp, capabilities }]

scanWifiCallback : function

A callback function to be called when scan is started

Kind: global typedef

Param Type Description
info Array An array of JSON objects with the following information: [{ SSID, BSSID, frequency, level, timestamp, capabilities }]

startWifiPeriodicallyScanCallback : function

A callback function to be called when scan is started

Kind: global typedef

stopWifiPeriodicallyScanCallback : function

A callback function to be called when scan is stopped

Kind: global typedef

getNetConfigCallback : function

A callback function to be called when scan is started

Kind: global typedef

Param Type Description
info Object An JSON object with the following information: { deviceIPAddress, deviceMacAddress, gatewayIPAddress, gatewayMacAddress }

getConnectionInfoCallback : function

Callback which provides the connection information.

Kind: global typedef

Param Type Description
info Object An JSON object with the following information: { SSID, linkSpeed, IPAddress }

pingHostCallback : function

Callback which provides the ping information.

Kind: global typedef

Param Type Description
info Object An JSON object with the following information: { requestTimeout, stat: { requestTimeout, time, min, max, stddev } }

getMacAddressOfHostCallback : function

A callback function to be called with all information

Kind: global typedef

Param Type Description
info String the MAC address

isDnsLiveCallback : function

A callback function to be called with DNS details

Kind: global typedef

Param Type Description
isDnsLive, boolean true if device is DNS is live, otherwise false

isPortLiveCallback : function

A callback function to be called with DNS details

Kind: global typedef

Param Type Description
isPortLive, boolean true if device is port is available, otherwise false

isRootedCallback : function

A callback function to be called with Rooted information

Kind: global typedef

Param Type Description
isRooted, boolean true if device is port is available, otherwise false