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/PT3SBTModule.js | 87 +++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 libs/ihealth-sdk/module/PT3SBTModule.js (limited to 'libs/ihealth-sdk/module/PT3SBTModule.js') diff --git a/libs/ihealth-sdk/module/PT3SBTModule.js b/libs/ihealth-sdk/module/PT3SBTModule.js new file mode 100644 index 0000000..0cfa516 --- /dev/null +++ b/libs/ihealth-sdk/module/PT3SBTModule.js @@ -0,0 +1,87 @@ +'use strict'; + +var {NativeModules} = require('react-native'); + +var RCTModule = NativeModules.PT3SBTModule + + /** + * @module PT3SBTModule + */ +module.exports = { + + Event_Notify: RCTModule.Event_Notify, + + /** + * set time + * @param {string} mac Device's mac address + */ + setTime: function (mac) { + RCTModule.setTime(mac) + }, + + /** + * get battery + * @param {string} mac Device's mac address + */ + getBattery: function (mac) { + RCTModule.getBattery(mac) + }, + + /** + * set unit + * @param {string} mac Device's mac address + */ + setUnit: function (mac, unit) { + RCTModule.setUnit(mac, unit) + }, + + /** + * get unit + * @param {string} mac Device's mac address + */ + getUnit: function (mac) { + RCTModule.getUnit(mac) + }, + + /** + * get history data count + * @param {string} mac Device's mac address + */ + getHistoryCount: function (mac) { + RCTModule.getHistoryCount(mac) + }, + + /** + * get history data + * @param {string} mac Device's mac address + */ + getHistoryData: function (mac) { + RCTModule.getHistoryData(mac) + }, + + /** + * delete history data + * @param {string} mac Device's mac address + */ + deleteHistory: function (mac) { + RCTModule.deleteHistory(mac) + }, + + /** + * Disconnect the pt3sbt + * @param mac The mac address for PT3SBT + */ + disconnect: function (mac) { + RCTModule.disconnect(mac) + }, + + /** + * Get all connected BTM device + * + * e.g. {"devices":["A4D5783FB00C","A4D5783FFE58"]} + */ + getAllConnectedDevices: function () { + RCTModule.getAllConnectedDevices() + } +} + -- cgit