Cordova HotSpot Plugin
A Cordova plugin for managing HotSpot networks on Android with Cordova 3.4.0 / API Level 19
Installation
$ cordova plugin add cordova-plugin-hotspot
Usage
Check if Plugin is available
cordova.plugins.hotspot.isAvailable(
function (isAvailable) {
}
);
Hotspot functionality
Create Hotspot
cordova.plugins.hotspot.createHotspot(ssid, mode, password,
function () {
},function () {
}
);
Stop Hotspot
cordova.plugins.hotspot.stopHotspot(
function () {
},function () {
}
);
Check if Hotspot is enabled
cordova.plugins.hotspot.isHotspotEnabled(
function () {
},function () {
}
);
Get all connected devices
cordova.plugins.hotspot.getAllHotspotDevices(
function (devices) {
},function (err) {
}
);
Wifi
Check if Wifi is supported
cordova.plugins.hotspot.isWifiSupported(
function () {
},function () {
}
);
Check if Wifi is enabled
cordova.plugins.hotspot.isWifiOn(
function () {
},function () {
}
);
Check if Wifi Direct is supported
cordova.plugins.hotspot.isWifiDirectSupported(
function () {
},function () {
}
);
Add a network config
cordova.plugins.hotspot.addWifiNetwork(ssid, mode, password,
function () {
},function (err) {
}
);
Delete a network config
cordova.plugins.hotspot.removeWifiNetwork(ssid,
function () {
},function (err) {
}
);
Start a periodically scan
cordova.plugins.hotspot.startPeriodicallyScan(interval, duration,
function () {
},function (err) {
}
);
Scan network
cordova.plugins.hotspot.scanWifi(
function (listOfNetworks) {
},function (err) {
}
);
Scan network by level
cordova.plugins.hotspot.scanWifiByLevel(
function (listOfNetworks) {
},function (err) {
}
);
Stop a periodically scan
cordova.plugins.hotspot.stopPeriodicallyScan(
function () {
},function (err) {
}
);