-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
33 lines (33 loc) · 987 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SensorType = void 0;
const react_native_1 = require("react-native");
const { RnSensorStep } = react_native_1.NativeModules;
var SensorType;
(function (SensorType) {
SensorType["COUNTER"] = "COUNTER";
SensorType["DETECTOR"] = "DETECTOR";
})(SensorType = exports.SensorType || (exports.SensorType = {}));
const RNSensorStep = {
start: (delay, sensorType) => {
RnSensorStep.start(delay, sensorType);
},
stop: () => {
RnSensorStep.stop();
},
checkSensorPermission: () => {
return new Promise((resolve, reject) => {
try {
resolve(RnSensorStep.checkSensorPermission());
}
catch (e) {
reject(e);
}
});
},
requestSensorPermission: () => {
RnSensorStep.requestSensorPermission();
},
};
exports.default = RNSensorStep;
//# sourceMappingURL=index.js.map