A Cordova plugin for managing HotSpot networks on Android with Cordova 3.4.0 / API Level 19
Feel free to donate
$ cordova plugin add cordova-plugin-hotspot
cordova.plugins.hotspot.isAvailable(
function (isAvailable) {
// alert('Service is not available') unless isAvailable;
}
);
cordova.plugins.hotspot.isConnectedToInternet(
function () {
// is connected
},function () {
// is not connected
}
);
cordova.plugins.hotspot.getConnectionInfo(
function (result) {
// SSID
// BSSID
// linkSpeed
// IPAddress
},function () {
// error
}
);
cordova.plugins.hotspot.getNetConfig(
function (result) {
// deviceIPAddress
// deviceMacAddress
// gatewayIPAddress
// gatewayMacAddress
},function () {
// error
}
);
cordova.plugins.hotspot.pingHost(ip,
function (result) {
if(result){
// host is up
} else {
// host is not responsing
}
},function () {
// error
}
);
cordova.plugins.hotspot.getMacAddressOfHost(ip,
function (result) {
if(result){
// MAC address of host
} else {
// host is not responsing
}
},function () {
// error
}
);
cordova.plugins.hotspot.isDnsLive(ip,
function (live) {
if(live){
// DNS is live
} else {
// DNS is not live
}
},function () {
// error
}
);
cordova.plugins.hotspot.isPortLive(ip,
function (live) {
if(live){
// DNS is live
} else {
// DNS is not live
}
},function () {
// error
}
);
cordova.plugins.hotspot.isRooted(
function (rooted) {
if(rooted){
// device is rooted
} else {
// device is not rooted
}
},function () {
// error
}
);
cordova.plugins.hotspot.createHotspot(ssid, mode, password,
function () {
// Hotspot is created
},function () {
// Error
}
);
cordova.plugins.hotspot.startHotspot(
function () {
// Hotspot is started
},function () {
// Error
}
);
cordova.plugins.hotspot.configureHotspot(ssid, mode, password,
function () {
// Hotspot is configured
},function () {
// Error
}
);
cordova.plugins.hotspot.stopHotspot(
function () {
// Hotspot is disabled
},function () {
// Error
}
);
cordova.plugins.hotspot.isHotspotEnabled(
function () {
// Hotspot is on
},function () {
// Hotspot is off
}
);
cordova.plugins.hotspot.getAllHotspotDevices(
function (devices) {
// array of JSON objects:
// -> ip
// -> mac
},function (err) {
// error
}
);
cordova.plugins.hotspot.isWifiSupported(
function () {
// wifi is on
},function () {
// wifi is off
}
);
cordova.plugins.hotspot.isWifiOn(
function () {
// wifi is on
},function () {
// wifi is off
}
);
cordova.plugins.hotspot.toggleWifi(
function (isActive) {
// wifi is on
},function (err) {
// error
}
);
cordova.plugins.hotspot.connectToHotspot(ssid, password,
function () {
// connected
},function () {
// not connected
}
);
cordova.plugins.hotspot.isConnectedToInternetViaWifi(
function () {
// is connected
},function () {
// is not connected
}
);
cordova.plugins.hotspot.isWifiDirectSupported(
function () {
// wifi is on
},function () {
// wifi is off
}
);
cordova.plugins.hotspot.addWifiNetwork(ssid, mode, password,
function () {
// wifi is added
},function (err) {
// error
}
);
cordova.plugins.hotspot.removeWifiNetwork(ssid,
function () {
// wifi is deleted
},function (err) {
// error
}
);
cordova.plugins.hotspot.startPeriodicallyScan(interval, duration,
function () {
// success
},function (err) {
// error
}
);
cordova.plugins.hotspot.scanWifi(
function (listOfNetworks) {
// array of results
},function (err) {
// error
}
);
cordova.plugins.hotspot.scanWifiByLevel(
function (listOfNetworks) {
// array of results
},function (err) {
// error
}
);
cordova.plugins.hotspot.stopPeriodicallyScan(
function () {
// success
},function (err) {
// error
}
);
export PLATFORM="android"
./runIntegrationTests.sh