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