react-native-smartconfig-swjava
Version:
32 lines (24 loc) • 836 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.stopSmartConfig = exports.startSmartConfig = void 0;
var _reactNative = require("react-native");
let {
SmartconfigSwjava
} = _reactNative.NativeModules;
const eventEmitter = new _reactNative.NativeEventEmitter(SmartconfigSwjava);
var subscription;
const startSmartConfig = (ssid, bssid, password, timeScan, callback) => {
if (typeof subscription !== 'undefined' && subscription) {
subscription.remove();
}
subscription = eventEmitter.addListener('SmartConfig', callback);
SmartconfigSwjava.start(ssid, bssid, password, timeScan, callback);
};
exports.startSmartConfig = startSmartConfig;
const stopSmartConfig = () => {
SmartconfigSwjava.stop();
};
exports.stopSmartConfig = stopSmartConfig;
//# sourceMappingURL=index.js.map