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/doc/ts28b.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 libs/ihealth-sdk/doc/ts28b.md (limited to 'libs/ihealth-sdk/doc/ts28b.md') diff --git a/libs/ihealth-sdk/doc/ts28b.md b/libs/ihealth-sdk/doc/ts28b.md new file mode 100644 index 0000000..0b1a5ac --- /dev/null +++ b/libs/ihealth-sdk/doc/ts28b.md @@ -0,0 +1,38 @@ +# TS28B Workflow + +## Import TS28B Module + +```js +import { + TS28BModule, + TS28BProfileModule +} from '@ihealth/ihealthlibrary-react-native'; +``` + +## APIs + +### Add and remove listener + +```js +// add +notifyListener = DeviceEventEmitter.addListener(TS28BModule.Event_Notify, (event) => { + console.log(event); +}); + +// remove +notifyListener.remove(); +``` + +### set measurement listener + +```js +TS28BModule.measure(mac); + +// response +notifyListener = DeviceEventEmitter.addListener(TS28BModule.Event_Notify, (event) => { + if (event.action === TS28BProfileModule.ACTION_MEASUREMENT_RESULT) { + console.log(event[TS28BProfileModule.RESULT]); + console.log(event[TS28BProfileModule.UNIT_FLAG]); + } +}); +``` \ No newline at end of file -- cgit