diff options
| author | hc <haocheng.xie@respiree.com> | 2026-04-13 15:17:52 +0800 |
|---|---|---|
| committer | hc <haocheng.xie@respiree.com> | 2026-04-13 15:17:52 +0800 |
| commit | d6d9a09d505d11148599a95a5be3e1351edbe0ac (patch) | |
| tree | a5f5891983d1ff207e99f683a5e151519cef4980 /libs/ihealth-sdk/doc/nt13b.md | |
| parent | e4fb9966e762852bf17f21c8406501d42fae0b61 (diff) | |
Local iHealth SDK, device detail screen, iOS event fixes
Diffstat (limited to 'libs/ihealth-sdk/doc/nt13b.md')
| -rw-r--r-- | libs/ihealth-sdk/doc/nt13b.md | 38 |
1 files changed, 38 insertions, 0 deletions
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 @@ | |||
| 1 | # NT13B Workflow | ||
| 2 | |||
| 3 | ## Import NT13B Module | ||
| 4 | |||
| 5 | ```js | ||
| 6 | import { | ||
| 7 | NT13BModule, | ||
| 8 | NT13BProfileModule | ||
| 9 | } from '@ihealth/ihealthlibrary-react-native'; | ||
| 10 | ``` | ||
| 11 | |||
| 12 | ## APIs | ||
| 13 | |||
| 14 | ### Add and remove listener | ||
| 15 | |||
| 16 | ```js | ||
| 17 | // add | ||
| 18 | notifyListener = DeviceEventEmitter.addListener(NT13BModule.Event_Notify, (event) => { | ||
| 19 | console.log(event); | ||
| 20 | }); | ||
| 21 | |||
| 22 | // remove | ||
| 23 | notifyListener.remove(); | ||
| 24 | ``` | ||
| 25 | |||
| 26 | ### set measurement listener | ||
| 27 | |||
| 28 | ```js | ||
| 29 | NT13BModule.measure(mac); | ||
| 30 | |||
| 31 | // response | ||
| 32 | notifyListener = DeviceEventEmitter.addListener(NT13BModule.Event_Notify, (event) => { | ||
| 33 | if (event.action === NT13BProfileModule.ACTION_MEASUREMENT_RESULT) { | ||
| 34 | console.log(event[NT13BProfileModule.RESULT]); | ||
| 35 | console.log(event[NT13BProfileModule.UNIT_FLAG]); | ||
| 36 | } | ||
| 37 | }); | ||
| 38 | ``` \ No newline at end of file | ||
