From d6d9a09d505d11148599a95a5be3e1351edbe0ac Mon Sep 17 00:00:00 2001 From: hc Date: Mon, 13 Apr 2026 15:17:52 +0800 Subject: Local iHealth SDK, device detail screen, iOS event fixes --- libs/ihealth-sdk/module/PO3Module.js | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 libs/ihealth-sdk/module/PO3Module.js (limited to 'libs/ihealth-sdk/module/PO3Module.js') diff --git a/libs/ihealth-sdk/module/PO3Module.js b/libs/ihealth-sdk/module/PO3Module.js new file mode 100755 index 0000000..2185bcf --- /dev/null +++ b/libs/ihealth-sdk/module/PO3Module.js @@ -0,0 +1,58 @@ +/** + * Created by lixuesong on 11/11/2016. + */ +'use strict'; + + +var {NativeModules} = require('react-native'); + +var RCTModule = NativeModules.PO3Module + +/** + * @module PO3Module + */ +module.exports = { + + Event_Notify: RCTModule.Event_Notify, + + /** + * Get the PO3 battery status. + * @param {string} mac Device's mac address + */ + getBattery: function (mac) { + RCTModule.getBattery(mac) + }, + + /** + * Start real-time measurement. + * @param {string} mac Device's mac address + */ + startMeasure: function (mac) { + RCTModule.startMeasure(mac) + }, + + /** + * Get the value of historical data in the PO3. + * @param {string} mac Device's mac address + */ + getHistoryData: function (mac) { + RCTModule.getHistoryData(mac) + }, + + /** + * Disconnect the PO3 + * @param mac The mac address + */ + disconnect: function (mac) { + RCTModule.disconnect(mac) + }, + + /** + * Get all connected PO3 device + * + * e.g. {"devices":["A4D5783FB00C","A4D5783FFE58"]} + */ + getAllConnectedDevices: function () { + RCTModule.getAllConnectedDevices() + } +} -- cgit