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/BG1Module.js | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 libs/ihealth-sdk/module/BG1Module.js (limited to 'libs/ihealth-sdk/module/BG1Module.js') diff --git a/libs/ihealth-sdk/module/BG1Module.js b/libs/ihealth-sdk/module/BG1Module.js new file mode 100755 index 0000000..ed55f2c --- /dev/null +++ b/libs/ihealth-sdk/module/BG1Module.js @@ -0,0 +1,40 @@ +'use strict'; + + +var { NativeModules } = require('react-native'); + +var RCTModule = NativeModules.BG1Module + +/** + * @module BG1Module + */ +module.exports = { + Event_Notify: RCTModule.Event_Notify, + + /** + * Send code to bg1 device + * @param {string} QRCode the result string of scanning strip bottle(ignore if use GDH strip) + * @param {int} stripType 1:GOD 2:GDH + * @param {int} measureType 1:Test with Blood 2:Test with control liquid (CTL) + */ + sendCode: function(QRCode, stripType, measureType) { + if (RCTModule != null) { + RCTModule.sendCode(QRCode, stripType, measureType); + }else { + console.log('~~~~~ RCTModule is null') + } + }, + + /** + * Parse bottle info from QRCode, include strip expire time,strip number,bottle id + * @param {string} QRCode + */ + getBottleInfoFromQR: function(QRCode){ + if (RCTModule != null) { + RCTModule.getBottleInfoFromQR(QRCode); + }else { + console.log('~~~~~ RCTModule is null') + } + } + +} -- cgit